Level bar goes passes its limit

I’ve recently made a level bar, it works, for some odd reason it goes pass its limit and im not sure what to do about it.


jumpPower.Changed:Connect(function()
	script.Parent.ProgressBar:TweenSize(UDim2.new(jumpPower.Value/rebornPrice.Value, 0, 0, 28))
end)

image

Check if the Value goes over the Limit (rebornPrice)

if jumpPower.Value >= rebornPrice.Value then
   script.Parent.ProgressBar:TweenSize(UDim2.new(1, 0, 0, 28))
else
   script.Parent.ProgressBar:TweenSize(UDim2.new(jumpPower.Value/rebornPrice.Value, 0, 0, 28))
end

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.