Overloaded traffic wouldn’t explain why enabling BreakJointsOnDeath instantly fixed it, enabling that changes practically zero other elements of my game.
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.
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.
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.
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.
I’ll make sure to check it out, for now my best fix was just disabling resetting as it’s not totally necessary for the game but was leaving characters in an unusable state.
Make sure that you leave the debounce in deathEventHandler() because if multiple sources fire, you’ll be getting multiple calls into that function for the same death event.
I have the same issue too with similar code. I’ve set non-player controlled humanoids (horses) to have BreakJointsOnDeath set to false and I never have this issue of the Died event being significantly delayed.
However, for the player characters, the Died event takes on average several seconds to actually fire; it’s never a set amount of time. Sometimes it works fine, other times it takes 10-15 seconds to fire. This only occurs when BreakJointsOnDeath is set to false. This is the snippet of the code that causes this abnormal stalling:
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
local humanoid = character:FindFirstChildWhichIsA("Humanoid")
humanoid.BreakJointsOnDeath = false
humanoid.Died:Once(function()
print("died")
end)
end)
end)
I don’t see anything particularly erroneous with this code, and once again, if BreakJointsOnDeath is set to true in the script, this code works everytime with no delay.
Hi guys. I’m sorry for the inconvenience caused by the issue you encountered and I apologize for the delay in investigating this matter.
I know many of you have saw this issue but after thoroughly testing the problem based on your reports, I wasn’t able to reproduce the bug on my end. It’s possible that there may be specific conditions or configurations necessary to trigger it.
I looked the engine code, track the workflow but didn’t find a problem either.
If any of you have a reproducible case or a sample repo rbxl file that can help us investigate this further, please feel free to share it with us. Your assistance in pinpointing the issue would be greatly appreciated.
It’s really hit and miss. Nobody has isolated the cause but it has been suggested that it has something to do with network ownership. As part of this bug report, I have uncovered another potential bug. The file that I attached for the workaround has the issue. One of the methods to kill the player does so intermittently. I think it as Humanoid:ChangeState() or something. It’s been like 7 months since I seen this report.
oh yeah
there is an issue of the respawning it sometimes doesn’t respawn
and which the character does not respawn immediately unlike with it breakjointsondeath is enabled
this isn’t humanoid death but breakjointsondeath
to make the character respawn, i have to go in shift lock and rotate camera
this isn’t a viable solution
killsimple.rbxl (50.0 KB)
here’s the file, the damage is dealt on the client as well as checking death (probably not the best method for detecting death however it is more responsive than the server)
the script the causes the issues is death detection in starter character scripts
just uncomment this line and it starts to break
--humanoid.BreakJointsOnDeath = false
also hold f to test it
run.Heartbeat:Connect(function()
if user:IsKeyDown(Enum.KeyCode.F) then
humanoid.Health -= 5
end
end)
there hasn’t been a fix, i am not sure why some games experience the bug while some don’t??? the event fires perfectly fine for my game, but the actual ragdoll script is delayed by about half a second. i would extremely happy if i could see a fix