Thanks alot, I added it into StarterCharacterScripts with a few tweaks to detect characters that dont have players behind them (NPCS) and now even after the character dies it still detects them.
I’ll look more into the differences between my script and the one you provided incase anyone needs a definitive solution