01 | frame = game.StarterGui.ScreenGui.Frame |
02 | function playerJoin() |
03 | wait(. 5 ) |
04 | frame.Welcome.Visible = true |
05 | wait(. 5 ) |
06 | frame.to.Visible = true |
07 | wait(. 5 ) |
08 | frame.COR.Visible = true |
09 | wait(. 5 ) |
10 | frame.Created.Visible = true |
11 | wait( 1 ) |
12 | frame.Namelessassasin.Visible = true |
13 | frame.ImageName.Visible = true |
14 | frame.TheAncientVampire.Visible = true |
15 | frame.ImageVamp.Visible = true |
16 | wait( 1 ) |
17 | frame.Play.Visible = true |
18 |
19 | end |
20 | 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?
01 | game.Players.PlayerAdded:connect( function (player) |
02 | frame = player:WaitForDataReady(PlayerGui").ScreenGui.Frame -- Waits for the playergui until it's ready so the script does not break. |
03 | z = frame:GetChildren() -- Get's children of z |
04 | for i = 1 ,#z do -- for every number of children of the frame. |
05 | if z [ i ] .ClassName = "Frame" or "TextLabel" or "TextButton" then -- If the Children of Frame is Frame or TextLabel Or a TextButton then |
06 | z [ i ] .Visible = true -- Make it visible |
07 | wait( 0.5 ) -- Waits half of a second |
08 | end |
09 | end |
10 |
11 | end ) |
If this helped +1, also if answered your question check mark :)