I have a leveling up system that should level up a player if they have more than LevelPoints(Exp) than the required level points to level up
Problem is, If player earned more than the required level points, They will level up by 2 or 3, Like if your Required Level Point is 120 and you earned 120+ levelpoints(Exp), You level up more than1.
levelpoint.Changed:Connect(function(c)
if levelpoint.Value >= required.Value then
levelpoint.Value = 0
addpoint.Value += 3
level.Value += 1
required.Value = level.Value * 100
p:LoadCharacter()
end
end)
if you created all the variables in Player class with folder and datastore, you can handle level in another script. So, you are getting exp, you are getting requiredexp, you are creating serverscript, and in it coding algorithm:
function LevelUp()
Exp -= RequiredExp
Level += 1
RequiredExp = Level * 100
end
Exp.Changed:Connect(function()
if Exp >= RequiredExp then
LevelUp()
end
end)