I'm trying to make a round system for my game but.. whenever I playtest it, the script disappears from ServerScriptService and the timer is set to -1. Could someone please help? Here is the script:
local RS = game:GetService("ReplicatedStorage")
local SS = game:GetService("ServerStorage")
local roundStarted = RS:WaitForChild("roundStarted")
local Timer = RS:WaitForChild("Timer")
local Status = RS:WaitForChild("Status")
--// MAIN SCRIPT --\\
while wait() do
if Status.Value == "Intermission" then
Timer.Value = 30
SS:WaitForChild("Teleport Pads").Parent = workspace
SS:WaitForChild("WaitForPlayers").Parent = workspace
while wait(1) do
Timer.Value =- 1
if Timer.Value == 0 then
Status.Value = "Round"
break
end
end
end
if Status.Value == "Round" then
Timer.Value = 80
workspace:WaitForChild("Teleport Pads").Parent = SS
workspace:WaitForChild("WaitForPlayers").Parent = SS
while wait(1) do
Timer.Value =- 1
if Timer.Value == 0 then
Status.Value = "Intermission"
break
end
end
end
end

1 comment
What is 'Status' In replicatedstorage?