Making an ultimate bar help

Im trash at math so can someone please explain why this isnt working:
image
I have two values: “currlevel,” which represents the current rage value (a DoubleConstrainedValue), and “final level,” which represents the maximum rage value (ragevalue.MaxValue). I attempted to divide these values and then adjust the X.Scale by a percentage, but it’s not working as expected, and I’m not sure why.

1 Like

i just asked chat gpt and he gave me this which works:

if ragevalue and not  transformation then
		local RageBar = originplr.PlayerGui.ScreenGui.RageBar.Frame
		
		ragevalue.Value += finalDamage * 2

		local percentage = ragevalue.Value / 100

		local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)

		local tween = game:GetService("TweenService"):Create(RageBar, tweenInfo, {
			Size = UDim2.new(percentage, 0, 1, 0) -- Adjust the 1 and 0 as needed for the Y-axis
		})

		-- Start the tween
		tween:Play()
	end

1 Like

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