My game needs a max for some leaderstats the stats are Level and EXP. The max for level is 50 and the max for EXP is 50,000.
thanks
Simple solution? Create something like
while wait() do if (level.Value > 50) then level.Value = 50 else if (EXP.Value > 50000) then EXP.Value = 0 end end
Keep in mind using raw leaderstats is easily exploitable and might allow for someone, if they really wanted to, to cheat to the top of your game with ease. You can look on the wiki for ways to fix this if this is something you might worry about.
--Scripting Helpers wants you to try-- By this I mean don't just ask for the answer to a question or straight up for a script to do something. This isn't a place to request scripts it's a place for help so next time just show that you actually tried or you will be marked with more negative rep. ;)