How can I make a no power event?

Like all of my posts, I’ve said I’m making a FNaF 1 Remake on Roblox. I’ve already finished everything (almost), but I forgot something. When your power runs out, if your doors are being used, it will just disable it self and go up. How could I make this from a remote event?

My door script:

	if not debounce then debounce = true
		if not door then door = true
            if _G.Door1Destroyed == tonumber(9) then
                     script.Parent.Door.eror:Play()
               return
            end
			script.Parent.Door.Sound:play()
			for i=0,15 do
				script.Parent.Door.CFrame = script.Parent.Door.CFrame - Vector3.new(0,0.8,0)
				wait()
				script.Parent.DoorButton.Color = Color3.new(0.333333, 1, 0)
				_G.Door1Enabled = 9
                game.ReplicatedStorage.Remotes.UpdateUsage:Fire("Door1Enabled")
			end
			script.Parent.Door.CFrame = script.Parent.Door.CFrame - Vector3.new(0,0.2,0)
			game.Workspace.Server.Power.Usage.Value = game.Workspace.Server.Power.Usage.Value + 1
			debounce = false
		elseif door then door = false
			script.Parent.Door.Sound:play()
			for i=0,15 do
				script.Parent.Door.CFrame = script.Parent.Door.CFrame + Vector3.new(0,0.8,0)
				wait()
				script.Parent.DoorButton.Color = Color3.new(1, 0, 0)
				_G.Door1Enabled = 10
				game.ReplicatedStorage.Remotes.UpdateUsage:Fire("Door1Disabled")
			end
			script.Parent.Door.CFrame = script.Parent.Door.CFrame + Vector3.new(0,0.2,0)
			game.Workspace.Server.Power.Usage.Value = game.Workspace.Server.Power.Usage.Value - 1
			debounce = false
		end
	end
end)```

How to detect if there is no power: game.Workspace.Server.Power.Value == 0, I know how to do this but I don't really know how to make the doors go up. if _G.Door1Enabled = 9, then the door is enabled.
local server = workspace:WaitForChild("Server")
local power = server:WaitForChild("Power")

power.Changed:Connect(function(powerVal)
	if powerVal == 0 then
		--do something if power value is 0
	elseif powerVal >= 9 then
		--do something else if power value is equal to or greater than 9
	else
		--idk if powerval can go below 0 but this would be executed for those cases
	end
end)

I think this is what you’re trying to do here.

ah no it’s fine I already found out how what i mean is i wanted it so when the powerVal hits 0 the doors cframe go up making it go up if they are enabled