Script errors on death then never works again

I have a script that works perfectly, it’s just that some times if you use it when the player dies, the script will check for a humanoid root part, find it to not exist, error, and then break permanently

Any easy way to fix this, or do I really just have to go back through my scripts and throw in "if FindFirstChild(“HumanoidRootPart”)"s everywhere?

1 Like

You should really only need 1 check unless the script takes more than a 1 to run to end. Do you have waits in the script. Paste the script?

I can easily fix this! Mind sharing the code?

I don’t know why you don’t use the :FindFirstChild() function, but you could use pcall() to avoid errors, I guess.