So im making a level system but im not sure what this means, can someone help me?
Heres the script
local bar = script.Parent.BackFrame.Expbar
local text = script.Parent.TextLabel
local player = game.Players.LocalPlayer
local level = player.leaderstats.Level
local exp = player.leaderstats.Exp
local expNeeded = tonumber(100 + math.exp(level * 2))^level.Value
text.Text = exp.Value.."/"..expNeeded
local change = exp.Value / expNeeded
bar:TweenSize(UDim2.new(change,0,1,0),"In","Linear",0.5)
exp.Changed:Connect(function()
expNeeded = tonumber(100 + math.exp(level * 2))^level.Value
text.Text = exp.Value.."/"..expNeeded
local change = exp.Value / expNeeded
bar:TweenSize(UDim2.new(change,0,1,0), "In","Linear",0.5)
end)
level.Changed:Connect(function()
expNeeded = tonumber(100 + math.exp(level * 2))^level.Value
text.Text = exp.Value.."/"..expNeeded
local change = exp.Value / expNeeded
bar:TweenSize(UDim2.new(change,0,1,0), "In","Linear",0.5)
end)