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)
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)
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.
3 comments
That looks about right. Does that not work?
I get this error. Workspace.Script:6: attempt to index nil with 'FindFirstChild'
try :WaitForChild() that should work because we are waiting for the player's character to load in