I want to clone a model but the script doesn't work and it doesn't give me any error in the output, what did I do wrong?
local a = script.Parent:Clone().Parent a.Parent = workspace a.Name = "arms"
When you clone an Instance, the newly created Instance will be identical to the original instance, except for two differences:
Now, looking at point 2, we can see that local a = script.Parent:Clone().Parent
sets a
to nil
. I'm quite surprised that you didn't receive an error message in the output, since on the next line the code accesses a nil value, trying to set its Parent to workspace
. Make sure that the cloning code is actually being executed.
As for fixing it, look at your Instance hierarchy. The appropriate code might be local a = script.Parent:Clone()
or local a = script.Parent.Parent:Clone()
, depending on how your game is set up.