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

How do I get the player from the player character?

I know how to get the character form the player but how do I get the player?

player = script.Parent.Parent
player.Character.Torso

but how would i get from the players character to the one in Players?

1 comment

0

nvm, got it

1 answer

I know you already found a solution, but just in case anyone else wanted to know, the Players service has a method called GetPlayerFromCharacter.

local character = game.Workspace.Player
local player = game.Players:GetPlayerFromCharacter(character)

1 comment

0

And opposite that, the Character member of Player object is a reference to their Character Model, when it isn't nil.

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