this is my code (it's in a server script)
ammount = 10 timedelay = 5 currencyname = "EXP" while true do wait(timedelay) for i,v in pairs(game.Players:GetPlayers()) do if v:FindFirstChild("leaderstats") and v then v.leaderstats[currencyname].Value = v.leaderstats[currencyname].Value + ammount end end end
I need the while loop to stop when you have 50000 EXP
if you know what do do please tell me in the comments
thanks
Assuming that you want the entire while loop to stop when you have 50 000 EXP, you could better use a different kind of loop, a Repeat Loop.
repeat --whatever is inside of the loop until EXP == 50 000