When I run my game in studio, all my scripts work. But when I publish them to ROBLOX, they don't.
I have NPC's in the replicated storage that are being cloned into the workspace. When they are cloned, a script inside of them runs.
I don't think this is a script issue.
If you're doing this on team create then it's because you haven't committed your scripts
Simply open the drafts section from the View tab
right click the scripts and click on Commit