In my previous post, I was discussing how my remote for welding a weapon to my hand didn't work. But upon further inspection, Clone() literally didn't work at all.
When using Clone() inside the script, there literally wasn't any trace of a cloned model, not even a blank thing in explorer.
I tried to go into the game, and forcibly clone a part using the command console, nothing happened.
I put this inside one of my models
local parent = script.Parent wait(10) parent:Clone()
Nothing happened.
Literally nothing works, and it doesn't return errors in F9.
I've done stupid things in the past that I have fixed, but this has left me very stumped.
If you know what's causing the error and could help,
thanks.
Your problem is that you're not setting a parent whenever you clone. Example:
local parent = script.Parent local clone = parent:Clone() clone.Parent = workspace
When cloning Instances
, you're always going to set a parent for the clone, I'm not sure why but that's just how it works
local objectClone = workspace.Object:Clone() print(objectClone.Parent) --nil objectClone.Parent = workspace print(objectClone.Parent)--Workspace
And if you're going to clone an object without changing properties or anything inside of it, you can simply do:
workspace.Object:Clone().Parent = workspace