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 5 years ago

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

2 answers

Log in to vote
3
Answered by 5 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 — 5y
0
I agree with laughablehaha AswormeDorijan111 531 — 5y
Ad
Log in to vote
-1
Answered by 5 years ago
Edited 5 years ago

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

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

Answer this question