Server goes away if certain functions are called from within schedule

script name is UserScript and if I don’t wrap the beginning of the functions self:GetEntity().GameMenuWidget:Show() and function UserScript:SpawnWorld(gameTemplate, numPlayers, numRaceTracks, controls, location) with

    if IsInSchedule() and IsServer() then
        self:SendToLocal("StartGame", nil)
        return
    end
    if not IsServer() then
        self:SendToServer("StartGame", nil)
        return
    end

when I try to start a game by running through the Group Takeoff Coming Soon sign, after a couple of crashes the game server will go. Saves from 2020-08-11 -> 2020-08-12 should cause the server crashes if the

if IsInSchedule() and IsServer()

if check is removed from those two functions.

Thanks mochi, we’ll take a look at this and will get back to you.

Hi Chris, any updates on this?
I’m was trying to make my game a little more performant by splitting some spawns across frames but came across this issue again, if I move part of the function into a schedule, the game will crash after a little while.

The game is Space Runner and the script is GameScript, I commented -- TODO: figure out how to move this loop into a schedule in front of the for loop block I want to move into a schedule.