So I'm making an experience system. The user gains experience but they never level up.
code -
game.Players.PlayerAdded:connect(function(player) wait(4) xp = player.savedvalues.xp level = player.savedvalues.level level1xp = 0 --first level level2xp = 50 --second level level3xp = 100 --third level level4xp = 150 --fourth level level5xp = 200 xp.Changed:connect(function() if xp.Value >= level1xp and xp.Value < level2xp then level.Value = 1 elseif xp.Value >= level2xp and xp.Value < level3xp then level.Value = 2 elseif xp.Value >= level3xp and xp.Value < level4xp then level.Value = 3 elseif xp.Value >= level4xp and xp.Value < level5xp then level.Value = 4 elseif xp.Value >= level5xp then level.Value = 5 end end) end)
Am I just missing something really obvious?
Thanks for reading