How do I access the Player in the workspace?
I want to be able to access the physical player in the workspace rather than the LocalPlayer in the Players section.
There is a property on Player
called Character
which always points to the Model
in the workspace (if there is one) that belongs to the player.
Make sure you read the wiki page about .Character
, though, because there are some subtleties about what Character
points to when a player is in the process of re-spawning.
Note that if you ever create custom characters, you can manually set Player.Character
and, if your characters are based on Humanoid
, the default ROBLOX controllers will automatically be linked to it.