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

more effective way to write this script?

Asked by 10 years ago
frame = game.StarterGui.ScreenGui.Frame
    function playerJoin()
        wait(.5)
        frame.Welcome.Visible = true
        wait(.5)
        frame.to.Visible = true
        wait(.5)
        frame.COR.Visible = true
        wait(.5)
        frame.Created.Visible = true
        wait(1)
        frame.Namelessassasin.Visible = true
        frame.ImageName.Visible = true
        frame.TheAncientVampire.Visible = true
        frame.ImageVamp.Visible = true
        wait(1)
        frame.Play.Visible = true

    end
    game.Players.PlayerAdded:connect(playerJoin)

im using this for my welcome gui to like wait a while before showing the next line, is there a more effective and cleaner way to write this script?

0
Done :P HexC3D 830 — 10y

1 answer

Log in to vote
2
Answered by
HexC3D 830 Moderation Voter
10 years ago

game.Players.PlayerAdded:connect(function(player) frame = player:WaitForDataReady(PlayerGui").ScreenGui.Frame -- Waits for the playergui until it's ready so the script does not break. z = frame:GetChildren() -- Get's children of z for i = 1,#z do -- for every number of children of the frame. if z[i].ClassName = "Frame" or "TextLabel" or "TextButton" then -- If the Children of Frame is Frame or TextLabel Or a TextButton then z[i].Visible = true -- Make it visible wait(0.5) -- Waits half of a second end end end)

If this helped +1, also if answered your question check mark :)

0
can you explain this script, im still a beginner and its kind of hard for me to interpret this namelessassasin 30 — 10y
0
Mk. HexC3D 830 — 10y
0
what if i want the guis to go in a certain order, is it not possible or is there a way namelessassasin 30 — 10y
0
also, i tested my script(not yours) and it doesnt work, do you know why namelessassasin 30 — 10y
Ad

Answer this question