It appears the :clone()/:Clone() function is cloning objects whose Archivable properties are set to false. The function should ignore non-Archivable objects. I noticed this while testing some old code that was broken, initially thinking the behavior of BindableFunctions were changed. I tracked the bug down to the clone() function acting strange.
Steps to reproduce:
[ol]
[li]Open a new place.[/li]
[li]Add a Part. Put a BoolValue (or any dummy object) inside of the part. Set both Part and the child object Archivable properties to false.[/li]
[li]Type this into the command bar:[/li]
workspace.Part:clone().Parent = workspace
[/ol]
Expected behavior:
The :clone() function should return nil and therefore throw an error when trying to set the .Parent property of the returned nil value.
Actual buggy behavior:
The :clone() function returns a copy of the part and all its descendants with all the Archivable properties set to true.
Edit:
Here’s some simpler code. The print() statement should print nil.
obj = Instance.new("Part")
obj.Archivable = false
obj2 = obj:clone()
print(obj2)