Whats wrong with this script? No errors i've tried everything.
local replicatedstorage = game:GetService("ReplicatedStorage")
local status = replicatedstorage:WaitForChild("InfoValue")
local mapStorage = game.Workspace:WaitForChild("mapStorage")
while true do
01 | while game.Players.NumPlayers > 1 do |
02 | status.Value = "There must be 2 or more players to play" |
03 | repeat wait( 2 ) until game.Players.numPlayers < = 2 |
07 | status.Value = "Intermision " ..i |
11 | for i, v in pairs (game.Players:GetPlayers()) do |
14 | table.insert(_G.gameplayers, v.Name) |
18 | local maps = game:GetService( "ServerStorage" ):GetChildren() |
19 | local chosenmap = maps [ math.random( 1 , #maps) ] |
20 | chosenmap:Clone().Parent = mapStorage |
21 | status.Value = "Get Ready!!" |
23 | local spawns = chosenmap:WaitForChild( "Spawns" ):GetChildren() |
24 | for _, player in pairs (game.Players:GetPlayers()) do |
25 | if player and #spawns > 0 then |
26 | local torso = player.Character:WaitForChild( "Torso" ) |
27 | local allspawns = math.random( 1 ,#spawns) |
28 | local randomspawn = spawns [ allspawns ] |
29 | if randomspawn and torso then |
30 | table.remove(spawns, allspawns) |
31 | torso.CFrame = CFrame.new(game.ServerStorage.WaterFall.Spawns.Model.Part.Position + Vector 3. new( 0 , 2 , 0 )) |
33 | local FireBall = game.ReplicatedStorage.FireBall |
34 | local newFireBall = FireBall:Clone() |
35 | newFireBall.Parent = player.Backpack |
40 | status.Value = i.. " Seconds Left!" |
42 | status.Value = "Times up" |
43 | for _, player in pairs (game.Players:GetPlayers()) do |
44 | if player:FindFirstChild( "leaderstats" ) then |
45 | player.leaderstats.Cash.Value = player.leaderstats.Cash.Value + 2 |
end
02 | for i = 60 , 0 ,- 1 do wait( 1 ) |
04 | status.Value = "Times up!!" |
09 | if #_G.gameplayers = = 1 then |
10 | for i, v in pairs (_G.gameplayers) do |
12 | status.Value = v.. " is the winner!" |
18 | status.Value = i.. " seconds remaining" |
22 | mapStorage:ClearAllChildren() |
end
The thing that isn't working is THe round is for 1 second long... instead of 60