Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Clone from lighting not getting destroyed?

Alright, last question. When a clone is created, after 3 seconds it is supposed to be destroyed but it isn't getting destroyed. Here is the code.

Skelly = game.Lighting["Mini Skeleton"]
while true do
	wait(5)
	Skelly:Clone().Parent = game.Workspace
	wait(3)
	Skelly:Destroy()
end

1 answer

✓ Accepted answer

edit: noticed your mistake, you destroyed the skelly in lighting rather than the clone of it

try this instead

local Skelly = game:GetService("Lighting"):WaitForChild("Mini Skeleton")

while true do wait()
    wait(5)
    local clone = Skelly:Clone()
    clone.Parent = workspace
    wait(3)
    clone:Destroy()
end

2 comments

0

Oh! I did not know you could just do "clone:Destroy()" thank you! I learned something new.

0

no problem

This discussion is preserved as it was. New answers, comments, and votes are closed.