UI messing around when Tweening it

Hello everyone! I’m having some problems with my game menu.

Everything works fine…

Except when I test the animation that I made for it…

I think that happens because I auto-scaled the whole GUI.
So? What could I do to fix it?

--script:
local image = script.Parent.Parent
--//
image.MouseLeave:Connect(function()
image:TweenPosition(UDim2.new(0.117, 0,0.212, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, .2, true)
end)
--//
image.MouseEnter:Connect(function()
image:TweenPosition(UDim2.new(0.14, 0,0.212, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, .2, true)
end)

Looks like something’s wrong with your Y positioning. Look at the initial position, it should be 0.117, 0, 0.212, 0; is that what the position is? It looks like it should be positioned around a third down the screen (~0.333). If it isn’t correct, you’d have to change it to 0.117, 0, (element.Position.Y.Scale), 0 on your leave event, and 0.14, 0, (element.Position.Y.Scale), 0 on your enter event.

It actually is…
Also that’s very strange:

I think you should do the actual parent and not the button(The Image)

1 Like