This is my problem, I am trying to make a system of a maximum value for example, if the player exceeds the value of 160000000 it returns to 160000000 and everything is a loop in the PlayerAdded event and unfortunately it does not work for me.
Someone help me to solve it?
Server Script :
game.Players.PlayerAdded:Connect(function(Player)
local folder = Player:WaitForChild("Stats")
while wait() do
if folder.Attack.Value <= 160000000 then
print("Max stats!")
folder.Attack.Value = 160000000
end
end
end)
I use translator, I would appreciate your help