Local Script won't work in deafult game

Some of local scripts works fine inside studio testing, but when it comes to game they work as they work randomly (every game join they could work or they won’t work). Studio output as the console don’t have any errors or warnings thought print logs.

If you know what’s the reason or you need more details write down.

Quick add, it may be work if character was respawned.

I assume your local script is listening to when a player spawns. Sometimes the character exists already way before the script runs, so it doesn’t detect it.

To fix it, you should add an if-then statement, checking if there’s already a character in your script. Hope this helps :slight_smile: