I want to make an Intermission
I tried to do <, <=, (time.Value <= 0), still doesn’t work
-- // The main script
wait()
local started = false
local time = game.ReplicatedStorage:WaitForChild("st")
local tic = false
local tac = false
local endtime = game.ReplicatedStorage:WaitForChild("en")
spawn(function()
game:GetService("RunService").Stepped:Connect(function()
if started then
time = 5
coroutine.wrap(function()
if tic then return end
tic = true
endtime.Value = endtime.Value - 1
wait(1)
tic = false
end)()
else
endtime.Value = 15
coroutine.wrap(function()
if tac then return end
tac = true
time.Value = time.Value - 1
wait(1)
tac = false
end)()
end
if (endtime.Value <= 0) then
started = false
time.Value = 30
end
if (time.Value <= 0) then
started = true
endtime.Value = 15
end
end)
end)