Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

Can I get local player with script? Yes or no please

Asked by 6 years ago

Can I get local player with script? Yes or no please

2 answers

Log in to vote
3
Answered by 6 years ago

No, you cannot. LocalPlayer will always be nil on the server. If you really need to get the Player object from the server, consider using one of these examples:

  • Players.PlayerAdded (event)
  • ClickDetector.MouseClick (event)
  • RemoteEvent.OnServerEvent (event)
  • RemoteFunction.OnServerInvoke (callback)
0
Great answer laughablehaha 494 — 6y
0
I agree with laughablehaha AswormeDorijan111 531 — 6y
Ad
Log in to vote
-1
Answered by 6 years ago
Edited 6 years ago

no you cannot get localplayer in a script, meaning game.Players.LocalPlayer

0
This should be a comment. User#19524 175 — 6y

Answer this question