Roact Issue in studio

I ran a particularly intensive script in studio for generating terrain, and a prompt came up saying a script was having trouble and asked me if I wanted to Kill or Break. I clicked Kill assuming the issue was my terrain but it turns out my terrain script was still going, and the script that had been killed was one I didn’t even know existed. Apparently Roact died and now it’s appeared as a tab in studio

I am not using Roact for anything, never inserted it, never required it, I’m just on an empty baseplate working on a single script for terrain. I can’t even find roact existing anywhere in the explorer. I assume it’s just built into studio, and I also assume this is not intended behavior for it?

1 Like

Roact is used by a number of plugins. This may just be a case of Studio not doing a very good job of picking the correct script. I recall pausing my game and random scripts opening – different every time.

2 Likes

Odd, I know I’ve had to break out of scripts a lot with terrain but this is the first time it’s opened random scripts that weren’t a part of my game

Roblox bundles several libraries for use in core scripts; Roact is one of them - check ROBLOX_VERSION/content/LuaPackages to see the full source and everything.

I’ve never had good results with kill / break opening the script responsible for hanging - this probably isn’t from Roact.

We’re taking a look at this. My hunch is that @EchoReaper is correct – I don’t think the break/kill window is jumping to the right script. Even if there were a Roact-based plugin taking up a lot of execution time, that would be a pretty weird place for things to hang.

1 Like

To my understanding, when Roblox starts resuming scripts, it counts how long since the first script was resumed and times out at 20 seconds regardless of how long each individual script takes. This means something like the following can happen:

  • Some plugin script takes 0.4 seconds
  • Some game script takes 0.6 seconds
  • Terrain script takes 18.5 seconds
  • Some plugin script takes 0.6 seconds, and triggers the script timeout.

Obviously the terrain script should be the one singled out and killed here, not whatever plugin script was running at the end. Roblox needs to move on and unfreeze the game though, and the only way it can do that is by killing the currently-running script (the plugin script). This behavior also exists online, but there is no window popping up to tell you what happened, it just kills the script and moves on.

Ideally we’d get some sort of popup window showing us what scripts took up what time when this happens so that we can fix the one that actually caused the issue rather than whichever was running at the end of the 20 seconds.


I’m not 100% sure that this is how it works, but based on my past experience, this seems to be what’s going on. If you just need more time for your scripts to run in Studio, then you can change the Script Timeout Length setting:

3 Likes