The transparency needs to go from 1-0
local frame = script.parent
I know it has something to do with
For i in i
You can use TweenService to tween the transparency property smoothly into 0. TweenService can also tween other properties such as Color3
local frame = script.Parent local tweenService = game:GetService('TweenService') local timeout = 1 -- will tween within 1 second function fade(transparency) tweenService:Create(frame, TweenInfo.new(timeout), { Transparency = transparency }):Play() end fade(0)
If you want to fade it to 0 with for loop you can do this
local frame = script.Parent function fade() for i = 1, 0, -0.1 do frame.Transparency = i wait(0.1) end end spawn(fade)