Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why my level up system is not working?

Asked by
MpAlex 16
3 years ago
local lv = Instance.new("IntValue")
    lv.Parent = psts
    lv.Name = "Level"
    lv.Value = 1

local xp = Instance.new("IntValue")
    xp.Parent = psts
    xp.Name = "Exp"
    xp.Value = 0

local xpMax = Instance.new("IntValue")
    xpMax.Parent = psts
    xpMax.Name = "ExpGoal"
    xpMax.Value = 10

xp.Changed:Connect(function()
        if xp.Value >= xpMax.Value then
            lv.Value = lv.Value + 1
            xp.Value = 0
            xpMax.Value = xpMax.Value * 2
        end
    end)

i don't think i need to explain more, i just want to level up

0
Are there any errors you can give? JuuzouBlitz 75 — 3y
0
there is no error, is just not working. the output is clear MpAlex 16 — 3y

Answer this question