I cloned a part in script, by doing:
1 | local ptc = script.Parent.PartToClone |
2 | local clonePart = ptc:Clone() |
How can I now remove it (destroy) in the same script? (if I do:
1 | ptc:Destroy() |
it throws error that this part doesn't exist, because needs to be created (before clone))
Simple what you have to do is
ClonePart.Parent = ServerStorage
if assert(ClonePart, "invalid") then ClonePart:Destroy() end