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

Is there a way for me to make a (while true do) not to keep looping?

Is there a way for me to make that Player.PlayerGui.Popup.Popup:Remove() not loop it's self over and over?

while true do
    for i = 0,1,0.01 do
        TextLabel.TextColor3 = Color3.fromHSV(i,1,1)
        wait(0.1)
    end
wait(5)
Player.PlayerGui.Popup:Remove()
end

I'd appreciate any advice!

1 comment

0

Well your not really telling the script to stop at a certain point so it will keep doing it

1 answer

✓ Accepted answer

If you want to stop a while true do loop, simply use break

If you want a line to execute only once, use a variable that is set to false before the loop and set to true right before end. You can check if its false to see if the loop is on its first run.

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