I need a leveling up system and this is pretty basic, but... it doesn't work.
game.Players.PlayerAdded:connect(function(player)
stat = Instance.new("IntValue", player)
stat.Name = "leaderstats"
Gold = Instance.new("IntValue", stat)
Gold.Name = "Gold"
Exp = Instance.new("IntValue", stat)
Exp.Name = "XP"
Level = Instance.new("IntValue", stat)
Level.Name = "Level"
Level.Value = 1
if Exp.Value == 4 * Level then
Exp.Value = 0
Level.Value = Level.Value +1
end
end)

1 comment
For line 15 do: if Exp.Value == 4 * Level.Value