We are having a few timeouts with a cloudscript. We are wondering what we can do to fix this. The timeout doesn't happen with everybody, just like 5 times a day and the script runs probably like 1,000 times a day. We would still like it to work all the time.
The script is a reward system for hitting target in a certain order or at least getting a reward for hitting them all in the time limit. Is it a big O problem? The PlayerOwnsCosmetic() is a tough one because we have to go through the player's inventory to find if the player has the cosmetic. So I imagine players with big inventory might have the script take longer?