You can get the local player by inserting this code inside a localscript:

local player = game.Players.LocalPlayer

However i dont really understand it, because when a player joins a game, the players character will become a child of Player while LocalPlayer wont. What i mean is that i cant find LocalPlayer under

game.Players

5 comments

1

It's a property not a child. You can access properties too like children that way. Oh and the character is a child of the workspace and not the player instance itself. Parts won't render if they're not descendants of workspace.

1

LocalPlayer is a property that references the player associated with the client. It can only be used in LocalScripts.

0

Actually game.Players.LocalPlayer is a property...

http://prntscr.com/ono2qj

1

Thanks, and what about player.Character is it also a property of player?

0

Yes