Hum.Died only fires once

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Make sure a function fires every time a player dies.

  2. What is the issue? The Humanoid.Died function only works once

  3. What solutions have you tried so far? I looked to make sure I am using :connect() and not :wait() and also double checked if the script is in StarterCharacterScripts an not StartPlayerScripts.

local player = game.Players.LocalPlayer or game.Players.PlayerAdded:Wait()
local char = script.Parent
local joins = module.joints()

local human = char:WaitForChild("Humanoid")

human.Died:Connect(function()
	module.joints()
end)

Module script code for anyone wondering

local player = game.Players.LocalPlayer or game.Players.PlayerAdded:Wait()
local character = player.Character or player.CharacterAdded:Wait()
local HeadTUTorso = Instance.new("BallSocketConstraint")
local head = character:WaitForChild("Head")
local upperTorso = character:WaitForChild("UpperTorso")
HeadTUTorso.Parent = head

local module = {}

function module.joints()
	HeadTUTorso.Attachment0 = head.NeckRigAttachment
	HeadTUTorso.Attachment1 = upperTorso.NeckRigAttachment
end

return module

You sure that it’s only firing once? It wouldn’t hurt to add a print() statement inside that Died() Event, and could you show us the Module script that’s supposed to handle it when the Humanoid dies?

It could also be something overlapping the script if possible

You’re right I forgot to add a print lol, lemme do that rq and ill get back to you!

It’s firing more than once, I guess I just did the joints weird! Thank you

Np, do make sure to mark the post as a solution if it did resolve your case! :slightly_smiling_face:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.