Humanoid.Died triggering while humanoid is alive

While I was trying to create a death scream, I came across Humanoid.Died.

Attempting to use Humanoid.Died, I found that it keeps triggering while the humanoid is alive.
Having the script disabled for 3 seconds when the humanoid is created still doesn’t work; Humanoid.Died still triggered. Please help.

local scream = script.Parent

local humanoid = script.Parent.Parent.Parent.Humanoid

screamable = true

if humanoid.Died then
	screamable = false
	scream:Play()
end

The wait script to attempt to stop humanoid.died from triggering:

local screamscript = script.Parent

wait(3)
screamscript.Enabled = true

In this script, Screamable doesn’t actually serve a purpose, so that can be ignored.

1 Like

humanoid.Died is an event when your doing if (humanoid.Died) then there is no condition to make it false technically, if you want the scream to play when the humanoid DOES die use this:

humanoid.Died:Connect(function()
  screamable = false
  scream:Play()
end)

More info: Humanoid.Died | Documentation - Roblox Creator Hub

1 Like

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