CustomerLoop = coroutine.create(function()
while wait(math.random(3)) do
SpawnCustomer()
end
end)
Intermission = coroutine.create(function()
if days ~= 5 then
ReplicatedStorage.SendTime:FireAllClients("Start")
print("EFEE")
while task.wait(1) do
ReplicatedStorage.TimeValues.IntermissionTIme.Value += 6
if ReplicatedStorage.TimeValues.IntermissionTIme.Value >= 30 then
ReplicatedStorage.SendTime:FireAllClients("Ended")
coroutine.resume(CustomerLoop)
coroutine.resume(StartTime)
coroutine.yield()
end
end
else
print("END OF GAME! YOU WON!")
end
end)
StartTime = coroutine.create(function()
while task.wait(2) do
if ReplicatedStorage.TimeValues.ShiftTime.Value == 12 then
days += 1
coroutine.yield(CustomerLoop)
coroutine.resume(Intermission)
coroutine.yield()
else
ReplicatedStorage.TimeValues.ShiftTime.Value += 1
end
end
end)
coroutine.resume(Intermission)
This script won’t work in anyway because some are called before and after what can I do to fix this? I really urgently need help