Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you have a fade in tween for an imagelabel?

Asked by 4 years ago
Edited 4 years ago

I tried looking up tutorials for it (because I'm new to coding) and none of them seemed to work. Please help, because I really want to have my start menu look good.

My script is supposed to be in StarterGui > Frame > ImageLabel.

1 answer

Log in to vote
1
Answered by
ScuffedAI 435 Moderation Voter
4 years ago

There are multiple ways of accomplishing this. You can either do it by using TweenService or with a for loop.

The property which is going to make the image fade is ImageTransparency which as the name reads, it controls the image transparency.

Here are the two ways in which you can do this

Using for loop:

local Image = script.Parent
for i = 1,0,-0.1 do
    Image.ImageTransparency = i
    wait()
end

Using TweenService:

local TweenService = game:GetService('TweenService');

-- We create a tween
local Tween = TweenService:Create(
    script.Parent, -- The object which it will tween
    TweenInfo.new(1), -- Information on how it will tween
    {ImageTransparency = 0} -- The properties which is going to be changed
)
Tween:Play()
Ad

Answer this question