1

I tried to apply a Humanoid Description on a player that joined the game but the output gives an error: "Attempt to index nil with humanoid". Heres is the code.

game.Players.PlayerAdded:Connect(function(Player)
    Player.Character.Humanoid:ApplyDescription(game.ServerStorage.HumanoidDescription)
end)
takezo
  • 101
  • 7

1 Answers1

0

You should wait for the Character to load in the game. Before applying the HumanoidDescription.

game.Players.PlayerAdded:Connect(function(Player)
    Player.CharacterAdded:Connect(function(character)
       wait()
       character:WaitForChild("Humanoid"):ApplyDescription(game.ServerStorage.HumanoidDescription)
    end)
end)

Vector3
  • 418
  • 2
  • 8