If your code isn’t working as you expect, you might try asking for advice in the Help with Scripts forum.
If it seems like what you’re seeing is a bug in Scratch rather than an issue with how you set up your code, see if someone else has fixed the problem in the Bugs & Glitches forum. If you can’t find the issue there, try asking for help by creating a new topic.