can someone give me an example of a script that works that makes a gui visible after a second or so when the player joins? im not requesting, i just need an example so i can apply the knowledge to what i have
help on playeradded function?
2 answers
game.Players.PlayerAdded:connect(function(plr)
wait(2)
plr:WaitForChild("PlayerGui").ScreenGui.Frame.Visible = false -- Change the names if necessary.
end)
Tada, use this as a example
+1 if this helped.
2 comments
on line 3, do you mean StarterGui
also how would i test this in solo, cause i heard pplayeradded wouldnot work in solo
game.Players.PlayerAdded:connect(function(player)
wait(1)
GUIX.visible = true
end
GUIX = game.StarterGui.NameofGui
2 comments
That variable should be declared above the function in the case that the function is called before the variable is declared. Also, I should mention that making something in the StarterGui visible doesn't make it visible for the player. You would have to make it visible in the player's PlayerGui.
An example to fix it would be to put the variable in the function at the top and say "local GUIX = player.PlayerGui.GUINAME". Also, I should mention that this script must be in the Workspace since you didn't mention that.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Duplicate q.q