That’s really helpful!
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.
I’ll let you know how things progress.
Thanks.
That’s really helpful!
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.
I’ll let you know how things progress.
Thanks.
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.
Thank you
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
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)
Hi IceCreamPickels,
Thank you for creating this repo.
Sorry about the delay.
We’re acknowledging that we will review it and get back to you.
Thank you.
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
Just out of curiosity, do you have deferred events turned on? I know that feature is more recent that this bug report, but just wondering. The only way that I have been able to fix this is to implement the workaround that I posted using all four of the passive monitoring methods. One of them will catch it immediately.
i tested all of the deferred events properties under workspace and none fixed it sadly. i think i will try to handle the ragdolls client sided. thats how other games seemed to bypass it