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

So how do i use repeat loops again?

Asked by
hokyboy 270 Moderation Voter
3 years ago
repeat wait(1)
    print("Checking Players Level")
until game.Players.LocalPlayer.Data.Level > 1 
print("Player is above level 1")
0
Thats correct. User#34929 0 — 3y

1 answer

Log in to vote
1
Answered by 3 years ago
Edited 3 years ago

Please provide explanation with your answers. Simply posting code does not spread knowledge of integral scripting processes which helps people understand the logic and reasoning behind your answer.

Try this.

while game.Players.LocalPlayer.Data.Level < 1 do
    wait(1)
end
print("Player is above level 1")

The script will continue to loop until they're level 2

Ad

Answer this question