So, I was trying to create custom deaths in my game, which used :LoadCharacter() after a NumberValue’s value in the character reaches 0. I had a camera script that followed the HumanoidRootPart’s CFrame, and it stopped working after I used :LoadCharacter(). This camera script was stored inside the backpack.
I honestly couldn’t think of any solutions, I was thinking that it wasn’t working because LoadCharacter() doesn’t reload scripts stored in the backpack, or in the player? How would I get around this issue?
I can almost guarantee you that LoadCharacter is not the issue. I smell an XY Problem.
That being said,
The PlayerScripts folder superseded using the backpack as a container for LocalScript code.
Are you trying to ensure that your code does or does not reload on death? If not, move your code to StarterPlayerScripts (which will be transferred to PlayerScripts). If you are, you’re going to need a different implementation. For example, you could put this LocalScript inside the character via StarterCharacterScripts.