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

how do I get the players character from player?

basically just trying to get the players character model. this doesn't work

game.Players.PlayerAdded:connect(function(player)
	local char = player.Character
	local head = char:FindFirstChild("Head")
	head:Destroy()
end)

3 comments

0

That looks about right. Does that not work?

0

I get this error. Workspace.Script:6: attempt to index nil with 'FindFirstChild'

0

try :WaitForChild() that should work because we are waiting for the player's character to load in

1 answer

✓ Accepted answer

if not player.Character then player.CharacterAdded:Wait() end add this before the local char line you need to wait until the character has loaded in

you can also do this repeat wait() until player.Character but it's a bad practice

and this would be even the best player.CharacterAppearanceLoaded:Wait()

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