Why is the Humanoid.Died Event Not Firing on my Custom Character? [SOLVED]
Asked by
7 years ago Edited 7 years ago
So I'm trying to make it so that when the player dies, they respawn:
01 | local function CharacterLoop(Player) |
02 | Player:LoadCharacter() |
03 | local Character = Player.Character |
05 | local NewCharacter = game:GetService( "ServerStorage" ):WaitForChild( "Clak" ):Clone() |
06 | NewCharacter.Parent = game.Workspace |
07 | NewCharacter.Name = Player.Name |
08 | Player.Character = NewCharacter |
10 | local CameraFixer = script.CameraFixer:Clone() |
11 | CameraFixer.Disabled = false |
12 | CameraFixer.Parent = Player:WaitForChild( "PlayerGui" ) |
14 | local Humanoid = Character:WaitForChild( "Humanoid" ) |
16 | NewCharacter:WaitForChild( "Animate" ).Disabled = false |
18 | Humanoid.Died:connect( function (deadPlayer) |
However, the Died event does not fire at all.
The Clak contains a HumanoidRootPart, a Head, and a Torso, and all of its parts are welded.
EDIT: If it helps, the model does not break apart upon death.