How do i use a fading effect in GUIs with TweenService?

Something basic i guess: I want to make a fading effect for an image set in a GUI, but how i do that? Thanks for responding :+1:

8 Likes
local TweenService = game:GetService("TweenService")
local imageThing = script.Parent --This is the variable for the image. Change it if needed.
local tweenInfo = TweenInfo.new(
	2, -- Time
	Enum.EasingStyle.Linear, -- EasingStyle
	Enum.EasingDirection.Out, -- EasingDirection
	-1, -- RepeatCount (when less than zero the tween will loop indefinitely)
	false, -- Reverses (tween will reverse once reaching it's goal)
	0 -- DelayTime
)
 
local tween = TweenService:Create(part, tweenInfo, {ImageTransparency = 1})

tween:Play() --Plays the tween
8 Likes

So, you would have to get the tweenservice then make the tween info:

local TS = game:GetService("TweenService")
local TI = TweenInfo.new(Enums)

TS:Create(part animated, TI, {Transparency = 1})
2 Likes