I’m trying to make a color block game that has multiple layers of blocks, but when I want to randomly want to color all of them, it just gets exhauseted and freezes (until it works [10 seconds]). I really want this to work but I have not found any solutions.I know this is a lot, but the amount of blocks is 720, and I want to color them all at once randomly every single round. Here is a screenshot of the script I have so far ( there are other variables defined earlier but most of them are self explanatory).
You’re likely doing too many iterations at once. If there’s 720 blocks in your game and 16 players, your loop will run 11,520 times. This is combined by the fact that it runs 300 times as well (3,456,000 iterations).