How to access a player in Workspace

I searched and couldn’t found what I was looking for.

A StarterCharacterScript goes to a player’s model in workspace just like thatimage
I want to access a player (not all players) in a workspace so I can access my “code”.
My question is simple, how can I access a player in workspace?
Note: I’m trying to do that with a local script in Starter gui

6 Likes
local Character = game.Players.LocalPlayer.Character 

I’m pretty sure this would work.

16 Likes

From the client:

game.Players.LocalPlayer.Character

From the server:

local charVariable
game.Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Wait()
    charVariable = player.Character
end)
6 Likes