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

Getting Character from player?

I want to parent something into a players torso but I need to get the players character first.

I have heard of game.Players:GetPlayerFromCharacter(player)

How would I get the Character from the player?

1 answer

✓ Accepted answer

The Player object has a Character property. This leads to the Character of the Player (if the player has one). For example:

Game.Players.Players.PlayerAdded:connect(function(Player)
    repeat wait() until Player.Character --Wait until the Player has a character
    Player.Character:Destroy() --Destroy the character
end)

3 comments

1

Adding to what Articulating said the character property is a reference to the players body parts, scripts, animation , clothing etc.

2

Those are within the Character itself, yes. That isn't relevant to the question.

0

Okay.

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