An expansion of my previous question, which was starting to have people give me scripts because I didn't post my own script.
I have a script here that clones a drop and positions it like it is falling of a pipe. When the droplet hits the floor (a brick named puddle), it is supposed to disappear. However, I am using the destroy method to make it disappear, and that is causing the droplet's parent (Workspace) to become "locked". Every time the script tries to loop and spawn the second droplet, it can't and gives the output "****The Parent property of Droplet is locked****"
How do I make it so that when the droplet is destroyed, the parent isn't locked?
Little = Workspace.Drop:Clone() while true do Little.Parent = Workspace Little.Position = Vector3.new(81.3, 7.3, 99.1) Little.Name = "Droplet" Little.Touched:connect(function(part) if part.Name == "Puddle" then Little:Destroy() end end) wait(5) end
I would use Little:remove()
or Little = nil
because Little:Destroy()
removes is completely from the game, so it won't be possible to clone it.
Litte = game.Lighting.Drop --Drop MUST be in workspace while true do Little:Clone() Little.Parent = Workspace Little:remove() wait() -- makes sure that studio doesn't crash end -- HOPE THIS HELPED :)
Try doing Little.Visibility = 1
That way it only appears that the droplet is gone, but really you still have it ready to be used again. Or, you could clone it before you remove it, with Little:Clone().Parent = What you want it's parent to be