UI Tweening Issue

Hello fellow DevForum members! I’m creating a topic today because I have an error in Studio. So basically what I want the UI to do is I want it to tween out when you put your cursor over it, so the image becomes bigger. Instead the UI does the complete opposite, it shrinks down. Here’s the script for the UI.

And here’s what happens to the UI.
robloxapp-20210425-1429561.wmv (192.9 KB)

1 Like

You don’t need to use square brackets.

script.Parent:TweenSize(UDim2.new(0, 0.148, 0, 0.068), "Out", "Linear", 0.5, true)

Ah I see the issue.

When it comes to :TweenSize() the first argument will always be the size in UDim2.new() which will specify the end size you want the UI to be. However you kinda put all the other arguments inside the same UDim2.new() which just confuses the program so much.

it should be:

script.Parent:TweenSize(UDim2.new(0,0.148,0,0.068), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 0.5, true)

and it should fix it.

1 Like