Is there’s any faster way than this? i want to make an Level System in my Game, so basically everytime you level up your Experience Requirement will be Increased by 500, so if you’re still level 1 and you got 2000 Experience your level will increase by 2 Levels.
if i use Division then the player will increase their level by 4 not 2 so i use this:
local total = 0 repeat wait() total = total + 1 expreq.Value = expreq.Value + 500 until exp.Value < expreq.Value exp.Value = exp.Value - expreq.Value level.Value = level.Value + total expreq.Value = level.Value * 500 points.Value = points.Value + (5*total)
I added wait() because it will crash the game if the players got too much exp, like 100M exp at level 1 will crash the game, but now if you got that much exp you must wait a really long time just to level up, which i really don’t want, so maybe there’s an algorithm to these kinds of thing without repeating things. and still got accurate results. if there is, please tell me!