Hey, I have an XP bar in which I want the XP goal to increase by the players level * 15 every time they level up. But the problem is that the bar just stays on the 0% mark and doesn't move at all.
Any ideas on how to fix it?, Thanks, Cuv
player = game.Players.LocalPlayer
l = player:FindFirstChild("leaderstats")
xvalue = l:FindFirstChild("XP")
levelv = l:FindFirstChild("Levels")
mathlevel = (levelv.Value * 15)
local PositionX = script.Parent.Position.X.Scale
local initX = script.Parent.Size.X
while true do
wait(0.1)
local CurrentXP = xvalue.Value
local XPTarget = CurrentXP / mathlevel
script.Parent.Size = UDim2.new( 0, XPTarget, 0, 15)
script.Parent.Position = UDim2.new(0.5, -100, 0.9, -20)
end

2 comments
Perfect, thanks. Suppose it saves the script continuously looping aswell +1
I would up vote it but it seems I've lost 8 rep with that question