Schkr1
(Schkr1)
#1

local scrollingFrame = script.Parent
scrollingFrame.TextButton.MouseEnter:Connect(function()
print("1")
scrollingFrame.TextButton:TweenPosition(UDim2.new({0.2, 0},{0, 0}), Enum.EasingDirection.In, Enum.EasingStyle.Quad, 0.5, true)
end)
-- Outputs "1" but doesn't TweenPosition.
This is the setup.
For some reason, I can’t seem to be able to tween the position of guis parented to a scrolling frame.
Anyone have the reason why?
1 Like
C_Sharper
(Sharpie)
#2
There is no UDim2
constructor that takes two tables representing both the X offset and X scale as arguments.
Try this instead:
scrollingFrame.TextButton:TweenPosition(UDim2.new(0.2, 0, 0, 0), Enum.EasingDirection.In, Enum.EasingStyle.Quad, 0.5, true)
2 Likes
colbert2677
(ImagineerColbert)
#3
Alternate recommendation: fromScale constructor which doesn’t require you to specify offset, if that’s ever relevant for you not to do.
UDim2.fromScale(0.2, 0)
You probably will need to specify offset since you’re working with ScrollingFrame elements, though.
2 Likes