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

While true do help?

Is there another way of doing this?

hint = Instance.new("Hint",game.Workspace)
hint.Text = 30
while true do
hint.Text = 10
wait(1)
hint.Text = 9
wait(1)
hint.Text = 8
wait(1)
hint.Text = 7
wait(1)
hint.Text = 6
wait(1)
hint.Text = 5
wait(1)
hint.Text = 4
wait(1)
hint.Text = 3
wait(1)
hint.Text = 2
wait(1)
hint.Text = 1


end

1 answer

✓ Accepted answer

Yes, for loops, It's much more efficent:

hint = Instance.new("Hint",game.Workspace)
hint.Text = 30
for i = 10,1, -1 do --Repeats 10 times, going down by 1 each time
	hint.Text = i
	wait(1)
end


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