Smooth Fade Tween

Hey developers, keeping this short and simple how would I create this simple push-down fade tween?

it doesn’t go all the way down it just goes down a bit then fades smoothly.

local button = --Your button.

local tween = game:GetService("TweenService")

tween:Create(button, TweenInfo.new(0.5), {BackgroundTransparency= 1, TextTransparency = 1, Position = button.Position - UDim2.new(0,100,0,0)}):Play()

Haven’t checked it at all, so tell me is it works.

Try using this code:

local TweenService = game:GetService("TweenService")
local PlayBtn = script.Parent -- assuming the local script is inside the btn

local info = TweenInfo.new(
	0.5, -- Animation duration
	Enum.EasingStyle.Sine, -- Animation style
	Enum.EasingDirection.In, -- Animation Movement Type
	0, -- Times it will repeat
	false, -- If it needs to reverse
	0 -- Any delay before the next tween
)

local Goal = {}

Goal.Transparency = 1
Goal.Position = UDim2.new() -- Put the position of where you want the text button to go

PlayBtn.Activated:Connect(function()
	local Tween = TweenService:Create(PlayBtn, info, Goal)
	Tween:Play()
end)

I dont have an actual idea on how to do that kind of effect, but it is possible.
I am just not sure how to make this type of effect, I apologize.

1 Like

I’m not sure if this works but try using udim2 to expand the text while using a tween to fade it.

That’s what ive been trying to do the person that did it told me they tweened the size and transparency i think Im just not sure what they mean exactly do you have ideas?

Consider looking at TweenService on the Roblox Developer page and find out other things what it can do. Tween Service is a seriously powerful tool to have when making some pretty sick UI. I recommend it.