Humanoid.Died event delayed (server)

so i have a server sided died event when ever a character gets added and it checks the humanoid for any tags aka a gun killfeed but sometimes when they die the died event can be delayed im not sure why though is there any alternative to humanoid.Died or do i need to change a few things?
thanks.

game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		local hum = char:WaitForChild("Humanoid")
		hum.Died:Connect(function()
			local t = {}
			for i , object in pairs(hum:GetChildren()) do
				if object.Name == "Tag" then
					table.insert(t,object)
				end
			end
       end)
end)

not putting full code since its long but you get the main part of it

Try putting T outside of the player added event :frowning_face:

no because it makes a new full table of the tags inside the player that died

i did some print testing from start to bottom and it ends pretty fast so i think it has to do something with the died event its self

how about instead of doing it the way your doing it you just, fire a remote inside of the died event on the client and then do the stuff you need to do

I actually did this but the odd delay from client to server was pretty annoying depending on ppls ping

Well did it work though?⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀

yes but with the players ping it can cause longer delays then the server

does some what mean it works or not?

Your code fires almost instantly in a blank test place for me.

I doubt your code is the issue itself.

looking at the way you write your code you probably have a memory leak somewhere

1 Like

yeah i thought so its about 200 lines and i printed from start to bottom printed both instantly so i think its the died event its self or the player im not sure

take Arsenal for example when you kill someone they instantly show up in the kill feed

You probably have an open connection somewhere, i.e memory leak

1 Like

if you want i could post all of the code if that helps

i could take a look and see if thats the problem but i doubt it

1 Like

What I am saying is that the Died event fires instantly in a new, blank test place. So whatever code you aren’t showing or something about your character setup (if it’s custom) is in the way of it.

there is not delay testing it on 2 player server with low ping but when more ppl come in sometimes it might get a weird delay or not even fire sometimes

That’s just an unfortunate reality of ping. It’s the time of delay for a server and a client to communicate. You can’t fix that unless you move your logic to the client and then verify it on the server.

here is the thing its all on the server

If you’re wanting to keep it all on the server there is nothing you can do about ping.

Short from asking Elon Musk-chan to give free fiber internet to the Earth.

1 Like