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
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: how to get a player's localplayer through a server script

Previous Thread :: Next Thread 
Sk8erDan is not online. Sk8erDan
Joined: 22 Mar 2010
Total Posts: 4565
20 Aug 2017 03:51 PM
my game is singleplayer. is there anyway possible to get the one player's localplayer through a server-sided script? this would make my game less complicated.
Report Abuse
Giftbots is not online. Giftbots
Joined: 24 Jul 2014
Total Posts: 12651
20 Aug 2017 03:59 PM
ya




game.Players.PlayerAdded:Connect(function(plr)
print(plr.Name)
end)

if youre trying to get the players character


game.Players.PlayerAdded:Connect(function(plr)
print(plr.Character.Name)
end)


Report Abuse
BunnyBoy26 is not online. BunnyBoy26
Joined: 17 Jun 2010
Total Posts: 5674
20 Aug 2017 04:44 PM
I think you are mistaking "LocalPlayer" as being something different than a "Player". They are both Player instances, LocalPlayer is just the way to index the player of the client in a LocalScript.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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