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

Get Character from Player?

I want to know hot get the Character from a player

is there a way to do this?

Instead of the ':GetPlayerFromCharacter()' method is there like an opposite of that? Like 'GetCharacterFromPlayer()'?

2 answers

✓ Accepted answer

I'll give you the code I use for this:

local player = --etc

if not player.Character then
	print("waiting for character")
	player.CharacterAdded:wait();
	char = player.Character
else
	char = player.Character
end

1 comment

0

Thanks

It's faster to type

Char = player.Character or player.CharacterAdded:wait()

1 comment

0

Lol 5 years late

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