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

Why won't this work? [closed]

Asked by 9 years ago

Please provide more explanation in your question. If you explain exactly what you are trying to accomplish, it will be much easier to answer your question correctly.
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
0
Please make your title relevant to your question. Also, elaborate on what's wrong, how it errors, etc.. Goulstem 8144 — 9y

Locked by Redbullusa and EzraNehemiah_TF2

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

1 answer

Log in to vote
3
Answered by
Goulstem 8144 Badge of Merit Moderation Voter Administrator Community Moderator
9 years ago

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
Ad