Tweening Help (GUI)!

I made a script for a tool everything is working but, instead of the text tweening back I want to just go back quickly like without the slow moving tween. Here is the line I want to change.

PlayerGui.ToolGui.MainFrame.SingingLabel:TweenSize(UDim2.new(0,0,1,0), "Out", "Sine")

2 Likes

From what I understand, try using :TweenPosition() instead of :TweenSize().

But what that does is moves the whole text I just want the size to be the size in the brackets.

local Speed_Or_Delay = 1

PlayerGui.ToolGui.MainFrame.SingingLabel:TweenSize(UDim2.new(0,0,1,0), "Out", "Sine", Speed_Or_Delay or 2, true)

use

local Speed = 1
local Pos = Udim2(coordinates)
game:GetService(‘TweenService’):Create(Frame, TweenInfo.new(Speed), {Position = Pos})

try doing

Enum.EasingStyle.Sine

and

Enum.EasingDirection.Out

instead of

"Out"

and

"Sine"

or you can try

local length = "replace this with whatever you want for length In Seconds"

game:GetService("TweenService"):Create(PlayerGui.ToolGui.MainFrame.SingingLabel, TweenInfo.new(length,Enum.EasingStyle.Sine,Enum.EasingDirection.Out,0,false,0), {Size = UDim2.new(0,0,1,0)}):Play()
3 Likes

If i remember correctly, a few of the easing styles, including Sine, don’t work correctly with TweenSize or TweenPosition, but that’s ok because they’re deprecated. But it works fine with TweenService, so use that instead.

-- Put this at the top of the script
local tweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Sine) -- the 1 is time in seconds, you can change it.

-- Use this in place of TweenSize
tweenService:Create(PlayerGui.ToolGui.MainFrame.SingingLabel, tweenInfo, {Size = UDim2.new(0,0,1,0)}):Play()
1 Like

hey, that’s what I said :frowning:

2 Likes