So, basically, whenever I try to tween an image button, it tweens to the correct X position, but not the right Y. For some reason it thinks the Y is 0, which is extremley frustrating. A little help? (I tried not using a variable for goal position, it didn't work haha.)
card.MouseEnter:Connect(function() local GOAL_POSITION = UDim2.new(card.Position.Width, 0,0.6, 0) card:TweenPosition(GOAL_POSITION,"InOut", "Quint", .1, true) print("mouseenter") print(GOAL_POSITION) --prints the Y as 0 end) card.MouseLeave:Connect(function() local GOAL_POSITION = UDim2.new(card.Position.Width, 0,0.75, 0) card:TweenPosition(GOAL_POSITION,"InOut", "Quint", .1, true) print("mouseexit") print(GOAL_POSITION) --prints the Y as 0. end)
Yes, the tween works, it just doesnt work for Y.
I don't think Position has a Width, just an X and a Y. So, rather than card.Position.Width
, do card.Position.X
.