Problem in local script when changing characters

Hi, does anyone know why this local script stops running when changing characters? Should I place it in a specific location or add something to my local script? It’s currently in StarterPlayerScripts.

Expected behavior

The local script should work well without being affected by the character changes in my game