local function heavyTask(...)
-- Some heavy task, calculations, creating parts, etc
end
local taskCoro = coroutine.create(heavyTask)
local success, result = coroutine.resume(taskCoro, ...)
print("free")
So ideally the game should run smooth while stuff is being done on the coroutine (another CPU core), but it doesn’t. It freezes the game (fps 0) and "free" feels printed after it. If I put wait()s in heavyTask then it works as expected but slow.