Humanoid.Died does not fire after the first death

Here’s a video of it not working:


Here’s the code:

local plrs = game:GetService("Players")
local DeathT = script.Parent:WaitForChild("Death")
local plr = plrs.LocalPlayer or plrs.PlayerAdded:Wait()
DeathT.Parent.Enabled = false
local TweenService = game:GetService("TweenService")

local tweenInfo = TweenInfo.new(3)

local tween = TweenService:Create(DeathT,tweenInfo,{["BackgroundTransparency"] = 0, ["TextTransparency"] = 0})
local tween2 = TweenService:Create(DeathT,tweenInfo,{["BackgroundTransparency"] = 1, ["TextTransparency"] = 1})
local char = plr.Character or plr.CharacterAdded:Wait()

local hum = char:WaitForChild("Humanoid")

local tableOfPhrases = {" got fried!", " got dundendun did brodda"," watched an among us animation video", " literally exploded"}
local runService = game:GetService("RunService")
hum.Died:Connect(function()
	
	DeathT.Parent.Enabled = true
	
	tween:Play()
	local randNumber = math.random(1,#tableOfPhrases)
	DeathT.Text = plr.Name .. tableOfPhrases[randNumber]

	task.wait(2.5)

	tween2:Play()

end)

Sorry for posting a lot, but I really do need help.

1 Like

Is this in the client or server. I had this issue for months until I put it in the server.

Put this in the server:


	game:GetService("Players").PlayerAdded:Connect(function(Player)
			Player.CharacterAdded:Connect(function(Character)

				Character:WaitForChild("Humanoid").Died:Connect(function()
					print(Player.Name .." has dead")

				end)
			end)
		end)

It is a client-sided script in ScreenGui. Should I make it a server-sided script?

That might be better.

This is a far fetched idea, but I think because the player died, Humanoid.Died does not execute on the client because the player has respawned before it can execute.

That works, it printed more than once.

Indeed, Also howdy again. You must go around helping others. I like I am doing right now.

1 Like

Then how would I go about fixing it?

Just putting it on the server should fix it, per @Nemigod77 's response

Did you put it twice. Else put it in both client and server. Never had that happen.

It works now, thank you for your help.

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