I am making an xp system in my game, but when the script I have resizes it, it makes the bar taller, I dont know why.
local bar = script.Parent
local text = bar.XpAmount
local player = game:GetService("Players").LocalPlayer
local level = player.LevelsInfo.Level
local exp = player.LevelsInfo.Experience
local expneeded = 50*level.Value
text.Text = exp.Value.."/"..expneeded
local change = exp.Value / expneeded
bar:TweenSize(UDim2.new(change, 0, 1, 0), "In", "Linear", 0.5)
while wait(1) do
exp.Changed:Connect(function(newXp)
expneeded = 50*level.Value
text.Text = exp.Value.."/"..expneeded
local change = exp.Value / expneeded
bar:TweenSize(UDim2.new(change, 0, 0, 0), "In", "Linear", 0.5)
end)
end
it makes it look like this: