TweeningUiTransparency

How do I tween the transparency of a ui? I know how to tween size and position but there isn’t a direct way to tween transparency. If anyone could help it would be greatly appreciated! :smiley:

Apparently all GuiObject share the property of Transparency, but I’m not quite certain if that property is actually writeable. It is a hidden one.

You just need to use TweenService and instead of tweening position/size property you need to tween Transparency property

local TweenService = game:GetService("TweenService")
local Info = TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, false, 0)
local Goal = {BackgroundTransparency = 1} --The property we're going to tween
local Frame = script.Parent -- define the frame

local Tween = TweenService:Create(Frame, Info, Goal)
Tween:Play()

Sorry if i have wrong spellings. I wrote it on mobile.

game.TweenService:Create(LocalizeFrameHere, TweenInfo.new(TweenTime, Enum.EasingStyle.SettedByYou, Enum.EasingDirection.SettedByYou), {["BackgroundTransparency"] = TransparencyHere})

Ohh I see! Thanks so much m8! :smiley:

1 Like