|
| 11 Jul 2014 07:21 PM |
| Hi, so I'm making a thing where once a player joins, a new TextLabel is created that says the new players name, followed by " has joined the game!", and that TextLabel would go onto all the players' screens. I just need to know how I would word something that would make a TextLabel in EVERYONE'S GUIs. Thanks! |
|
|
| Report Abuse |
|
|
|
| 11 Jul 2014 07:30 PM |
WelcomeMessageParent = Instance.new("ScreenGui") WelcomeMessage = Instance.new("TextLabel",WelcomeMessageParent) game.Players.PlayerAdded:connect(function(Player) WelcomeMessageParent.Parent = game.StarterGui WelcomeMessage.Text = Player.Name.." ".."Has joined the game!" wait(5) -- Increase this to the time you want before it disappears. WelcomeMessageParent.Parent = nil end)
|
|
|
| Report Abuse |
|
|
|
| 11 Jul 2014 07:34 PM |
Actually, to help you understand, I created a variable named "WelcomeMessageParent" and a second variable which was the actual "TextLabel" called "WelcomeMessage", I then used the PlayerAdded event which activates everytime a new "Player" is added into the table "Players", here's an example, game.Players.PlayerAdded:connect(function(Player) print("A new "Player" has joined the game"!.) end) |
|
|
| Report Abuse |
|
|
|
| 11 Jul 2014 07:37 PM |
| AWESOME! Thanks. I didn't know I just had to make the TextLabel in StarterGui as soon as someone joined. Anyway, thanks dude! -Gives player points- |
|
|
| Report Abuse |
|
|
|
| 11 Jul 2014 07:39 PM |
| Actually if you want, I can give you player points. Want some? |
|
|
| Report Abuse |
|
|
|
| 11 Jul 2014 07:39 PM |
| No thank you, this is voluntary. |
|
|
| Report Abuse |
|
|
|
| 11 Jul 2014 07:53 PM |
| Sorry to bother again, it doesn't show up when a new player joins the game. It just stays in StarterGui. Help please? |
|
|
| Report Abuse |
|
|
| |
|