The countdown works and the number value in replicated storage is 0 but the teleportation does not work and it won't print "zero"
local function gi()
local int = game:GetService("ReplicatedStorage").int
local bo = game:GetService("ReplicatedStorage").gfd
while true do
wait(1)
int.Changed:Connect(function()
script.Parent.Text = "Intermission = "..int.Value
end)
if bo.Value == true then
int.Value = int.Value - 10
if int.Value == 0 then
bo.Value = false
end
else
int.Value = 0
end
end
if int.Value == 0 then
print("zero")
script.Parent.Visible = false
for _, player in pairs(game.Players:GetPlayers()) do
if player.Character then
player.Character:SetPrimaryPartCFrame(CFrame.new(-184, 0.5, 141))
end
end
end
end
game:GetService("ReplicatedStorage").fds.OnClientEvent:Connect(gi)

1 comment
Instead of coroutine.resume(coroutine.create(function() end)), do coroutine.wrap(function() end)