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

how do I make this script loop?

Asked by 9 years ago
a = game.Workspace.test.PointLight
wait(4)
a.Color = Color3.new(1, 0, 0) 
wait(2)
a.Color = Color3.new(1, .156, 0) 
wait(2)
a.Color = Color3.new(1,1,0)
wait(2)
a.Color = Color3.new(.34,1,0) 
wait(2)
a.Color = Color3.new(0,.12,1)
wait(2)
a.Color = Color3.new(1,0,1)

thanks, -bb1

0
I probably should have looked at the wiki before I posted this... bestbudd1 45 — 9y

2 answers

Log in to vote
1
Answered by
Perci1 4988 Trusted Moderation Voter Community Moderator
9 years ago
while true do
--code
end

This will make your code loop an infinite amount of times. For more information, go here: http://wiki.roblox.com/index.php?title=Loops#While

0
thanks bestbudd1 45 — 9y
Ad
Log in to vote
0
Answered by 9 years ago

The coding would look like this:

while true do
a = game.Workspace.test.PointLight
wait(4)
a.Color = Color3.new(1, 0, 0)
wait(2)
a.Color = Color3.new(1, .156, 0)
wait(2)
a.Color = Color3.new(1,1,0)
wait(2)
a.Color = Color3.new(.34,1,0)
wait(2)
a.Color = Color3.new(0,.12,1)
wait(2)
a.Color = Color3.new(1,0,1)
end

Answer this question