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

How do I make a GUI pop up on the screen when someone joins?

Asked by 10 years ago

I want a GUI I made to pop up on the screen of the localplayer that joins...

How do I make this happen?

0
I would reccomend learning about the PlayerAdded event. wjs3456 90 — 10y

3 answers

Log in to vote
2
Answered by 10 years ago

You should use a PlayerAdded event to make a Frame, or other GUI object, appear.

game.Players.PlayerAdded:connect(function(player)
    player.PlayerGui.WelcomeGui.WelcomeLabel.Visible = true
    wait(5)
    player.PlayerGui.WelcomeGui.WelcomeLabel.Visible = false
end)

The above is just an example. Be sure to study it and experiment with it to get a good idea of how it works if you don't already... a synopsis: Fires when a player joins.

Hope I could help!

Any questions, please ask!

Ad
Log in to vote
0
Answered by
lomo0987 250 Moderation Voter
10 years ago

Set this as a local script of the gui that you want to make 'appear'...

repeat wait() until game.Player.LocalPlayer
wait(1)
script.Parent = GUI
GUI.Visible = true
--[[ If you want to make it go invisible after a bit of time, just delete this line and line 8.
wait(10)
GUI.Visible = false
]]

This will make it so when ever they respawn it opens. But if you want to make it so it's only once, try looking at the wiki HERE: http://wiki.roblox.com/index.php?title=PlayerAdded_(Event)

and edit it to suit what you need.

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

What you need is a PlayerAdded event, that then clones the gui into the player's PlayerGui.

game.Players.PlayerAdded:connect(function(plr) --PlayerAdded Event.
repeat wait() until plr.PlayerGui ~= nil --Wait until the PlayerGui exists
game.Lighting.Gui:Clone().Parent = plr.PlayerGui --Clone the gui from Lighting
end)

What this does is the event triggers when a new player joins, we can use the parameter 'plr' that was set between the parenthasi, to indicate the player themselves. Then we wait for the Player's PlayerGui and then clone thre gui into it. Purdy easy and you can manipulate this script to whatever you need for this.

-Goulstem

Answer this question