You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the documentation of Instance.Archivable, when this property is false, it introduces the possibility of Instance.Clone() failing by returning nil rather than throwing an error.
Calling Clone directly on an object will return nil if the cloned object is not archivable.
This is unfortunately a conscious decision that is slightly unsafe. The Archivable property is very rarely used, and the inconvenience of the possibly-undefined type outweighs the benefit of the better correctness.
We should add a warning to the documentation comment though.
Fair enough, though it may be necessary to add some sort of warning specifically when cloning models, as character models are not archivable by default.
According to the documentation of Instance.Archivable, when this property is
false
, it introduces the possibility ofInstance.Clone()
failing by returningnil
rather than throwing an error.https://roblox-ts.com/playground/#code/DYUwLgBAlgdgzmAhjAxiCBeCMQHcICS8SqIAFAEQCyA9gCYjAUCUAdAMLA05nMQD0-CGAAWUOBBQ0ArsDoQARugAG0mAwBmsEHWUAoPQAcATrDBlYCZGlYA5RAFsQzIA
The text was updated successfully, but these errors were encountered: