How Should I Make A Fnaf Power Mechanic?

I have absolutely no experience scripting heartbeat functions or mechanics like this. I want to make it so I’m constantly losing power, but when I close a door or open my cameras, I lose power faster. This is the same mechanic as what is in the FNAF games. Can someone help me?

like add boolen values for the doors and camera

and make it so it checks if they are true

if they are Then make your script lose power faster

2 Likes

that sounds about right, but how do i add the base power mechanic?

Add a number value and just subtract it every secound

1 Like

alright! thank you so much for the help!