Hovering "Animation" that scales a gui not working

I’m trying to make a button that gets taller on the Y axis when hovered by a mouse. This is my script, but it doesn’t work because the button just disappears. The offset from the X axis keeps changing and the Y axis just turns to (0, 0). Does anyone know how to fix this?

Script:

Button.MouseEnter:Connect(function()
	Button.Size = UDim2.new(Button.Size.X.Scale, Button.Size.Y.Scale + 500)
end)
1 Like

UDim2.new() requires 4 arguments UDim2 | Roblox Creator Documentation

You might want UDim2.new(Button.Size.X.Scale, 0, Button.Size.Y.Scale + 500, 0)

1 Like

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