generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: How To get the message on the output?

Previous Thread :: Next Thread 
smeaddesktop is not online. smeaddesktop
Joined: 25 Mar 2011
Total Posts: 796
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 is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
15 Jul 2013 01:26 AM
PlayerAdded is the event. Not Playeradded.
Report Abuse
smeaddesktop is not online. smeaddesktop
Joined: 25 Mar 2011
Total Posts: 796
15 Jul 2013 01:28 AM
lol wow that was all? Thank you for helping.
Report Abuse
smiley599 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image