Script doesn't run after a wait()

Hello !
So i’m trying to fix this script. On this script, everything works fine (by this i mean that nothing is returned in output) but I every after “wait(3)” won’t run. I tried to remove this, and it works completly fine, and when I put them back, it “breaks”. here’s the code, really odd don’t know what the issue is :

local timer = 60
local temp = game.Workspace.Temp
local alrGoDown = false

temp.Changed:Connect(function()
        if alrGoDown == true then return end
        alrGoDown = true
        script.Parent.TextColor3=Color3.new(1,0,0)
        game.ReplicatedStorage.TimerRemote:FireAllClients("On", alrGoDown)
        script.Parent.Parent.Alert:Resume()
        wait(3)
        script.Parent.Parent.Evac:Resume()
        script.Parent.Parent.Alarm:Resume()
        script.Parent.Parent.Snapped:Resume()
        for i = 1, timer do
            timer -= 1
            wait(1)
            print(timer)
        end
        game.ReplicatedStorage.TimerRemote:FireAllClients("Off", alrGoDown)
        timer = 60
        alrGoDown = false
        script.Parent.Parent.Countdown:Stop()
        script.Parent.Parent.Snapped:Stop()
        script.Parent.Parent.Alarm:Stop()
        script.Parent.Parent.Music:Stop()
        script.Parent.Parent.ExplosionSound:Stop()
        local e = game.ServerStorage.Explosion:Clone()
        e.Parent = workspace
        e.Position = script.Parent.Parent.Parent.Parent.Parent.Reactor.Position
        e.Script.Disabled = false
        temp.Value = 2500
end)

Hello Black_Albi

Can you tell me if this is in a script or a localscript?

hey !
Sorryh for the delay I was cooking some food :stuck_out_tongue:
This is located in a server script, as shown with

     game.ReplicatedStorage.TimerRemote:FireAllClients("Off", alrGoDown)