How to fix sever lag on death?

In my gun game (It uses FE gun kit btw) when you die it sometimes causes a lot of lag, like sometimes itll freeze your screen or sometimes make the ping of everyone in the server go very high, it did this before I even had a map so i dont think it has to do with my map or anything, please help.

You haven’t provided a lot of info to go from, but has it got something to do with a script spamming errors? If you can provide more detail on the game and what’s in it I’m sure someone will be able to help.

I don’t know whats causing it, is there a way to find out? and for game detail its a relativly small city map with a variety of guns thats basically all

Do you have any scripts that run on player death?

This post needs more information

Do Ctrl+Shift+F
search for each of the following terms:

.Died
.CharacterAdded

Post the code you find

Nope, no died gui, no ragdoll, no nothing

there might be a build up of instances on the character causing lag when they get destroyed

1 Like

It could really be anything, we’re not getting much info about what is causing it

It could be the fact that the player’s humanoid health is getting set to 0 multiple times because of the guns. Try adding this in your touched event in your bullets:

if character.Humanoid.Health == 0 then
error("Player's health is 0")
end