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
 

ServerScript

Previous Thread :: Next Thread 
Creatorworld is online. Creatorworld
Joined: 26 Dec 2013
Total Posts: 492
24 Feb 2017 09:31 AM
how can i find a player (the player that is playing) from a script in ServerScriptService without touching the part or anything?


Report Abuse
Snowskateer is not online. Snowskateer
Joined: 06 Dec 2011
Total Posts: 4647
24 Feb 2017 10:00 AM
for i,v in pairs(game.Players:GetPlayers()) do
if v.Name == "whatever" then
end
end

Report Abuse
Creatorworld is online. Creatorworld
Joined: 26 Dec 2013
Total Posts: 492
24 Feb 2017 10:01 AM
u didnt understand , i mean like (localplayer)


Report Abuse
Snowskateer is not online. Snowskateer
Joined: 06 Dec 2011
Total Posts: 4647
24 Feb 2017 10:01 AM
you cant access localplayer from a serverscript
but you can do game.Players.NAME or whatever
or you can fireclient if you want to interact

Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
24 Feb 2017 10:05 AM
To be brutally clear with you- this is not possible, because there are only Clients, and a Server.
There is no such thing as LocalPlayer for the server because the server isn't a client.

Now, you can only detect players through certain events like .Touched, .PlayerAdded, etc, and you can look directly in the Players service to get a list of all the players in your game.



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