Im trying to make it where the clone of an object ONLY spawns after one has been destroyed. Sort of like
if Part is destroyed then Part.Clone() spawns
but i can't figure out how to word it for the script. Can anyone please help me?
Im trying to make it where the clone of an object ONLY spawns after one has been destroyed. Sort of like
if Part is destroyed then Part.Clone() spawns
but i can't figure out how to word it for the script. Can anyone please help me?
Say the part was named "Part". You could dupe it into rep. storage, and then do something like this:
while true do
if game.Workspace:FindFirstChild("Part") == nil then
wait(1.5)
game.ReplicatedStorage.Part:Clone()
game.Workspace.Part.Position = --Your Position Here
end
end
i tried this, it just keeps making the part disappear seconds after i run the game. I've checked my script to make sure I got everything right.
Something like that? Might work idk
local PartToClone = game.lighting.PartToClone:Clone() if game.workspace.PartToClone then else PartToClone.Parent = workspace end
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
local PartToClone = game.lighting.PartToClone
Never use Lighting for storage. You should use ReplicatedStorage or ServerStorage