Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

more effective way to write this script?

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?

1 comment

0

Done :P

1 answer

✓ Accepted answer

  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 :)

4 comments

0

can you explain this script, im still a beginner and its kind of hard for me to interpret this

0

Mk.

0

what if i want the guis to go in a certain order, is it not possible or is there a way

0

also, i tested my script(not yours) and it doesnt work, do you know why

This discussion is preserved as it was. New answers, comments, and votes are closed.