TeleGUI = game.Workspace.TG.TalkGUI
function
wait (20)
game.Workspace.TeleportGUI.TalkGUI.Frame.BackgroundTransparency = 0
wait(0.5)
game.Workspace.TeleportGUI.TalkGUI.Frame.BackgroundTransparency = 0.1
wait(0.5)
game.Workspace.TeleportGUI.TalkGUI.Frame.BackgroundTransparency = 0.2
wait(0.5)
game.Workspace.TeleportGUI.TalkGUI.Frame.BackgroundTransparency = 0.3
wait(0.5)
game.Workspace.TeleportGUI.TalkGUI.Frame.BackgroundTransparency = 0.4
wait(0.5)
game.Workspace.TeleportGUI.TalkGUI.Frame.BackgroundTransparency = 0.5
wait(0.5)
game.Workspace.TeleportGUI.TalkGUI.Frame.BackgroundTransparency = 0.6
wait(0.5)
game.Workspace.TeleportGUI.TalkGUI.Frame.BackgroundTransparency = 0.7
wait(0.5)
game.Workspace.TeleportGUI.TalkGUI.Frame.BackgroundTransparency = 0.8
wait(0.5)
game.Workspace.TeleportGUI.TalkGUI.Frame.BackgroundTransparency = 0.9
wait(0.5)
TeleGUI.Parent:Remove()
end
COMMUNITY QUESTION
Why won't this work?
1 answer
There are a few mistakes here.
1) - You need to name your function, then add the parameter holders ' () '.
2) - You need to either connect your function to an event or call it somewhere.
Efficiency edits;
1) - You can use a numerical for loop, rather than resetting the value over and over and over
2) - The remove() method is deprecated, use the Destroy() method.
local TeleGUI = game.Workspace.TG.TalkGUI
function fade()
wait (20)
for i = 0,1,.1 do
workspace.TeleportGUI.TalkGUI.Frame.BackgroundTransparency = i
wait(0.5)
end
TeleGUI.Parent:Destroy()
end
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Please make your title relevant to your question. Also, elaborate on what's wrong, how it errors, etc..