Delay in Humanoid.Died event triggering when BreakJointsOnDeath is disabled


image

Recorded video clip of the bug occurring above.
When the user hits reset, there is a massive delay between when the .Died event of the humanoid is triggered and when the user pressed the reset button.

This can be partially be worked around by enabling BreakJointsOnDeath however that defeats the objective of having this property in the first place.
I’ve read other posts saying that I should swap the .Died event for a :GetPropertyChangedSignal(“Health”), however this has a similar issue, the health value also suffers the same massive delay.

Expected behavior

.Died event should fire instantly.

(EDIT)
Might be important to note that CharacterAutoLoads is disabled.

7 Likes

Does not reproduce with the following code on the server, please include a repro file.

game:GetService("Players").PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		local humanoid:Humanoid = character:WaitForChild("Humanoid")
		humanoid.BreakJointsOnDeath = false
		humanoid.Died:Once(function()
			print("Died")
		end)
	end)
	player:LoadCharacter()
end)

You should also check that IncomingReplicationLag in Studio settings is not enormous.

image

1 Like

And that’s the only code? You haven’t disabled BreakJointsOnDeath as far as I can see…
Have also verified the incoming replication lag, although I assumed that was a given.

1 Like

Sorry, I didn’t include that but I’ll edit it in, but no it does not reproduce when either of the settings you mention are toggled. I have both of these set the same way in my game and a ragdoll system running on Died and I have no issues.

Maybe you should include which beta features you have enabled?

1 Like

I’ll experiment with disabling them to see which ones may be causing issues.
For note I had all beta features enabled during that recording.

2 Likes

Have disabled them all, issue is still occuring.

2 Likes

Recommend trying to distill it down to a repro file then. Do you see the same issue using the code I provided in e.g. your place file / a baseplate?

1 Like

Issue doesn’t occur when I test in a baseplate, obviously leads me to believe it’s some sort of change I’m making to the character in my game which causes the delay, I’m hunting for whatever seems to break it now, but so far have come up short.
And before you say it, I have not disabled the “Dead” HumanoidStateType. :wink:

2 Likes

Worst case scenario if it’s nothing you’re specifically doing, since you’re listening to this on the server, maybe your server is overloaded with either network traffic, replication, or processing. Maybe try disabling all systems that can communicate through remotes and any other heavy systems and see if the latency improves.

1 Like

Same issue here, and its been around for years.

CharacterAutoLoads has nothing to do with it.

I cant exactly find what causes this, but it might have something to do with network ownership?

EDIT: I can actually repro this on a default baseplate.
image

EDIT 2: And now it doesnt work, but it did works twice when my character didnt load and I was stuck with the default noob avatar.

EDIT 3: I can narrow it down to always happening when using an R6 rig, except OP does not use an R6 rig.

1 Like

Yep, was immediately what I assumed too.

Overloaded traffic wouldn’t explain why enabling BreakJointsOnDeath instantly fixed it, enabling that changes practically zero other elements of my game.

1 Like

Seems like it’s delayed by 30 seconds. What if you adjust the respawn time? I understand this is probably unrelated but 30 seconds looks like an intentional number.

It should also be known whether this issue persists if you manually kill the player with code.

Respawn time is set to 3 seconds, timing was just coincidentally 30 seconds, and yes have experimented with killing the player with code, makes little difference, it’s also not practical to be killing characters with external code as this is what the reset button is for.

I have been investigating this for some time myself. For me, sometimes it works, sometimes it doesn’t. CharacterAutoLoads is enabled for me. I was going to post a bug report about this last night, but I couldn’t reproduce it.

I have read that there seems to be an issue with network ownership causing this. I have also read that it triggers instantly on the client regardless of what’s happening on the server. One workaround is to watch for it on the client and fire a remote event to the server when the player dies, but I cannot do that in my game.

Here’s a few previous posts about this same issue.

Humanoid.Died not firing/ delayed
Humanoid.Died is not working
Humanoid.Died not working properly
Humanoid.Died not working

That last one supposedly fixes the issue. In my opinion, this is a bug and needs to be addressed.

3 Likes

Thanks for the suggestions, interestingly I never saw these when I was researching the problem.

I assume I’ll get a reply from the ROBLOX staff within a few days, but even then I’m not holding my breath as 90% of what I report I never receive an update on anyway.

I guess we’ll see what they come back with, I’m not a massive fan of firing an event to the server whenever a client dies particularly, feels a bit tacky to me.

This also happens with one of my custom characters, and at this point we should all just make our own character system.

How about you make one for all of us! :wink:

After doing a little bit of research, I whipped up a little something to reliably detect when a player dies. Not sure why I didn’t think about doing this first.

Engine - Humanoid.Died Event.rbxl (42.9 KB)

Interestingly though, I think I may have uncovered a bug with Humanoid:StateChanged(Enum.HumanoidStateType.Dead). It seems that one does not reliably kill the player.

I have provided 6 different methods to detect when a humanoid dies. Four of them are event related, two of them are polling methods (polling methods are mutually exclusive). So one of them will catch when a humanoid dies.

Cheers.

Thanks for the report! We’ve filed a ticket in our internal database and we’ll follow up when we have an update for you.

4 Likes