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

Is someone able to help me identify the issue?

Asked by
D3VRO 66
6 years ago
Edited 6 years ago
local status = game:GetService("ReplicatedStorage").status
local gameInProgress = 30
local gameOver = 1

while true do
 for timer = 45,1-1 do
  status.Value = "Intermission: "..timer
  wait(1)
 end
 local mapsFolder = game.ServerStorage.Maps:GetChildren()
 local randomMap = mapsFolder[math.random(1, #mapsFolder)]
 randomMap.Parent = workspace.CurrentMap

 local spawns = randomMap.Spawns:GetChildren()
 local teleport = spawns[math.random(1, #spawns)]

 for z = 15,1 ,-1 do 
  status.Value = "Teleporting players to map in: "..z.." seconds"
  wait(1)
 end

 for i,plr in pairs(game.Players:GetPlayers()) do
 plr.Character:MoveTo(teleport.Position)
 end

 for b = gameInProgress,0,-1 do
  status.Value = "Game in progress: "..b.." seconds remaining"
  wait(1)
 end

 for c = gameOver,0,-1 do
  status.Value = "Round has ended!"
  wait(1)
 end

So I recently decided to script a game round script, but an issue has occurred. After 3 or 4 rounds the UI textlabel doesn't change to the desired teleportation text, instead it stays at "Round Over". If someone could help me identify the issue to this so I can resolve it that'd me great.

randomMap:Destroy() wait(1) end

0
code block please 20002000sa 83 — 6y
0
not worth spending the time going through this.. is kinda messy ffejyos 10 — 6y
0
please edit the question and put the code in a CodeBlock (press the Lua icon near the C in the top of your question, the lua icon is like 2 blue circles) VewixxPlayer 67 — 6y
0
Line 6? "1-1", that's probably causing the error. Pojoto 329 — 6y

Answer this question