|
| 15 Jul 2013 01:20 AM |
I'm trying to make the script say in the output, "A new player has entered the game" when a new player arrives.
When I press enter in the output the error says, "Playeradded is not a valid member of players". How do I fix this?
Here is the script:
game.Players.Playeradded:connect(function(player) print("A new player has entered the blank game" .. Player.Name) end) |
|
|
| Report Abuse |
|
|
ZachBloxx
|
  |
| Joined: 26 Jun 2013 |
| Total Posts: 2833 |
|
|
| 15 Jul 2013 01:26 AM |
| PlayerAdded is the event. Not Playeradded. |
|
|
| Report Abuse |
|
|
|
| 15 Jul 2013 01:28 AM |
| lol wow that was all? Thank you for helping. |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 15 Jul 2013 01:55 AM |
Your script is wrong, but not by much. You said Player.name, when the text inside the brackets was 'player', therefore:
game.Players.PlayerAdded:connect(function(player) print("A new player has entered the blank game" .. player.Name) end)
Two things. You would only see that on test mode, and the last time I checked, PlayerAdded does not work on it. Even so, I would recommend:
game.Players.PlayerAdded:connect(function(player) print(player.Name.." has entered the blank game") end)
Scripting Tutorials: youtube.com/user/smiley599roblox |
|
|
| Report Abuse |
|
|