'TweenSize()' is not working on loop

Hello! I’m trying to make a play button for a game. Somehow, nothing happens when I test it. (not a single error in the output either)

Here is my local script in the text button.

while true do
	script.Parent:TweenSize(UDim2.new(0, 400, 0, 132))
	wait(0.5)
	script.Parent:TweenSize(UDim2.new(0, 300, 0, 100))
    wait(0.5)
end

Once the game is loaded, the button increases size. However. it stays that way and does not shrink. It’s supposed to expand and shrink nonstop.

If you can fix this issue, it would be very appreciating.

1 Like
while true do
	script.Parent:TweenSize(UDim2.new(0, 400, 0, 132), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 0.3)
	wait(0.5)
	script.Parent:TweenSize(UDim2.new(0, 300, 0, 100), Enum.EasingDirection.In, Enum.EasingStyle.Linear, 0.3)
    wait(0.5)
end

You need to add the other necessary tweening info! :smile:

2 Likes