Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

2 answers

###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)

2 comments

0

Great answer

0

I agree with laughablehaha

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

1 comment

0

This should be a comment.

This discussion is preserved as it was. New answers, comments, and votes are closed.