Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Move script wont loop?

Asked by 8 years ago

Okay here is the script I got

while true do workspace.Mario:remove() game.Lighting.Mario1:Clone().Parent = game.Workspace wait(8) workspace.Mario1:remove() game.Lighting.Mario2:Clone().Parent = game.Workspace

wait(60)
workspace.Mario2:remove()
game.Lighting.Mario3:Clone().Parent = game.Workspace
wait(20)
workspace.Mario3:remove()
game.Lighting.Mario4:Clone().Parent = game.Workspace
wait(1)

end

What do I do to make it loop?

1 answer

Log in to vote
0
Answered by 8 years ago

Hello! So the only error I saw was you were using the "remove" method. This method I'm pretty sure only applies to scripts or tables. Destroy gets rid of the model.

while true do 
game.Workspace.Mario:Destroy() 
game.Lighting.Mario1:Clone().Parent = game.Workspace 
wait(8) 
game.Workspace.Mario1:Destroy()
 game.Lighting.Mario2:Clone().Parent = game.Workspace
wait(60)
game.Workspace.Mario2:Destroy()
game.Lighting.Mario3:Clone().Parent = game.Workspace
wait(20)
game.Workspace.Mario3:Destroy()
game.Lighting.Mario4:Clone().Parent = game.Workspace
wait(1)
end
-- It should work, but I'm not entirely sure. If this doesn't work, IDK WHAT WILL.

EDIT: Ok, so what remove does is set the objects parent to nil. I'm not sure if that would screw it up or not, but yeah.

Ad

Answer this question