Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Error "timeout before resuming thread" not allowing me to test my game?

Asked by
Vido01 5
7 years ago

I made a game a while ago and was testing just fine for along time but I took a break and came back to it about a week ago and ever since then whenever I go into "Test" mode I get the error "timeout before resuming thread" on all my scripts. Whenever I go into play mode in studio it works just fine but whenever I add multiple people in test mode all of my scripts shut down and give me that same error. My scripts were working fine just fine but here is the Master script.

m = Instance.new("Message")

h = Instance.new("Hint")

m.Parent = game.Workspace

h.Parent = game.Workspace

players = game.Players:GetPlayers()

while true do if game.Players.NumPlayers >= 1 then

    --m.Text = "Loading-Please wait."

    wait(8)

    Spawns = game.Workspace.Elevator.Spawns1:GetChildren()

    Spawnz = game.Workspace.Spawns2:GetChildren()

    --m.Text = "Teleporting to Elevator"

    wait(4)

    --Choosing roles

    contestants = {players}

    for _, players in pairs(game.Players:GetPlayers()) do

        if players and players.Character then

            local humanoid = players.Character:WaitForChild("Humanoid")

            if humanoid and humanoid.Health > 0 then

                table.insert(contestants, players)

            end

        end

    end 

    Demon = players[math.random(1, #contestants)]

    --while true do

        randomplayer = players[math.random(1, #contestants)]

        if randomplayer ~= Demon then

        end
            Hunter = randomplayer

        wait(0.1)

    --end   

 backpack = game.Players:FindFirstChild("Backpack")

    if backpack then

        if players == Demon then

            local illuminati = game.ServerStorage.Knife:Clone()

              illuminati.Parent = game.Players:FindFirstChild("StarterGear")

        elseif players == Hunter then
            local illuminboti = game.ServerStorage.RossRifle:Clone()

            illuminboti.Parent = game.Players:FindFirstChild("StarterGear")

        end

    end


    for i, v in pairs(game.Players:GetPlayers()) do

         name = v.Name

         check = game.Workspace:FindFirstChild(name)

        if check then

            checkHumanoid = check:FindFirstChild("Humanoid")

            if checkHumanoid then

                check:MoveTo(Spawns[i].Position)

            end

        end

    end

    --m.Text = "Game in progress"

    wait(45)


    for i, v in pairs(game.Players:GetPlayers()) do

        if checkHumanoid then

            check:MoveTo(Spawnz[i].Position)

        end

    end

--m.Text = "Round ended"

wait(5)

--m.Text = "Starting new round"

wait(5)

end

wait(0.1)

end

There isn't anything that I can think of that I added or removed that would cause that error. The whole hunter and demon selecting isn't finished yet so it doesn't work atm but it has stayed exactly the same since the script was running smoothly. I was trying to test the selecting to see if it worked but I got that error and it won't even run any of my scripts at all. It was working just fine before I don't think I did anything that would cause this but if anybody knows please help.

2 answers

Log in to vote
0
Answered by 7 years ago

When it times out, it can be caused by a slow internet connection. If that is not the case, try researching the error. If it keeps happening try contacting ROBLOX Support.

Ad
Log in to vote
0
Answered by 7 years ago
Edited 7 years ago

I completely disagree with dotProgram

Although I may be wrong, I do not believe the timeout has anything to do with your internet connection.

This error can happen no matter the types of scripts in your game. However, this error can be simulated/caused by an infinite loop.

The error is thrown when roblox can't load the game. Normally this has to do with the quality of the computer and not the quality of the internet.

The error is safety so you don't lose your progress when testing your game.

There's no real fix. Make sure you have no infinite loops. If the problem persists, test the game on a server and if it works it may be your pc.

Good Luck.

Answer this question