Making size UDim2.new vertical, instead of vertical

I need it to be resized vertical instead of horizontal for an UI. Amyway on how to do that?

local char = script.Parent.Parent.Parent.Character
hum = char.Humanoid
hum.Changed:connect(function()
	script.Parent.Frame.Player.beingweird.Size = UDim2.new(hum.Health/hum.MaxHealth,0,1,0)
	if hum.Health <= hum.MaxHealth*0.30 then
		script.Parent.Frame.Player.beingweird.BackgroundColor3 = Color3.new(0.505882, 0.101961, 0.101961)
	else
		script.Parent.Frame.Player.beingweird.BackgroundColor3 = Color3.new(0.156863, 0.505882, 0.105882)
	end
end)

Can you elaborate on what you want?

From what I’m reading you could change the line to

script.Parent.Frame.Player.beingweird.Size = UDim2.new(1,0,hum.Health/hum.MaxHealth,0)
1 Like

By the y coordinate make red background resize itself into the bottom of frame. So far just like standard healthbar, but inside of going from right to left, it should go from up to down.

1 Like

Even though it works more as it supposed to, it’s still goes up when player takes damage, and down if healing. Any ways to solve that?

1 Like

You can change the anchor point of the bar so that it is 0,1 and then position it in the same place, that might solve it

1 Like

image
I mean, it supposed to re-size below when getting damaged. Instead it just goes up.