My Level System used to work but it no longer does. I don’t think I changed anything, please help.
1 Like
paste code to ur original thread
For how long have you been using this script? If it’s been a long long time, it might be because your script has depreciated code that Roblox no longer supports.
This might help however: In-Experience Leaderboards | Documentation - Roblox Creator Hub
It’s supposed to be local RequiredExp = Player.leaderstats.Level.Value * 100 + 100
I’ve been constantly using it and a few months ago it just all of a sudden stopped working.
Didn’t fix it, must be something else.
Player.leaderstats.Exp:GetPropertyChangedSignal(“Value”):Connect(function()
local RequiredExp = Player.leaderstats.Level.Value * 100 + 100
if Player.leaderstats.Exp.Value == RequiredExp or Player.leaderstats.Exp.Value >= RequiredExp then
Player.leaderstats.Exp.Value -= RequiredExp
Player.leaderstats.Level.Value += 1
end
end)
That’s the code.
You can try using a while loop here, if not then it’s something outside the code
local Exp = player.leaderstats.Exp
local Level = player.leaderstats.Level
local isLevelingUp = false -- to prevent spawning too much while loops
Exp:GetPropertyChangedSignal("Value"):Connect(function()
if isLevelingUp == true then return end
isLevelingUp = true
while task.wait() do
local RequiredExp = Level.Value * 100 + 100
if Exp.Value >= RequiredExp then
Exp.Value -= RequiredExp
Level.Value += 1
else
isLevelingUp = false
break
end
end
end)