[Solved] Long code execution causes timeout on server, works fine in studio

Basically, I have procedural terrain generation code that is quite computationally expensive, as it involves the use of the Flood-Fill algorithm, and quite a few loops. The issue is, this code will cause script timeouts online, whereas it works fine in studio. I feel like this is related to my setup being able to handle it, while the server is throttled or unable to handle it.

The strange thing, is that timeout occurs after 10s of execution, but I’ve heard from multiple sources that it takes 20s to timeout online.

Is this normal behavior?

Can you show us a video of the problem?