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

Game round loop? script is not repeating

Asked by 5 years ago

Hello.

I recently started making a round-based game called 'Jeff'. But after 1 round, my script doesn't return to the start (picking a map, killer etc) it just loops the gameplay. Can somebody help me?

There is a normal script and a module script, both in server script service

Normal script:

001while true do
002--repeat wait() until game.Players.NumPlayers >= 2
003 
004local IntermissionRoundRemote = game.ReplicatedStorage:WaitForChild("IntermissionFrame")
005local LightningOfKiller = game.ReplicatedStorage:WaitForChild("LightningOfJeff")
006local Round = require(script:WaitForChild("Intermission"))
007 
008while wait() do
009 
010Round.Intermission()
011Round.Calibrate()
012game.ReplicatedStorage.Status.Value = "Game starting soon!"
013 
014wait(2.5)
015 
View all 207 lines...

Module script (Inside of normal script)

001local module = {}
002 
003local KillerChosen
004local KillerInWorkspace
005local MapChosen
006local PLRS = {}
007 
008local LightningOfKiller = game.ReplicatedStorage.LightningOfJeff
009 
010function module.Calibrate()
011    for i, v in pairs(game.Players:GetChildren()) do
012        if v then
013            table.insert(PLRS, v)
014        end
015    end
View all 146 lines...

Thank you

0
Wouldn't you need more than 1 player to test this. That might be the problem. I honestly didn't read through the whole script, but try testing your game in a server test to see if it works. Sir_Ragealot 72 — 5y

1 answer

Log in to vote
0
Answered by
Ga7in6 5
5 years ago
Edited 5 years ago

Put a end) at the last line of each of those, that might help

Ad

Answer this question