Prison doors open/close by clicking with a text label color in control room

I want it so when I click the door named Door1, it will open. Then in the control room the surface text label will go green if open, red if closed. ]

I’m not the best scripter and I attempted it but failed.

Youtube doesn’t help as I am trying to script it so if your on the team you can open it by clicking on it but it shows it is open in the control room.

If you can help, thanks.

Okay you’ll need to have a click detector in this “Door 1” and have a local variable to have if open is false or true but set it to true or false and then you can use a if statement to check if it’s false or true and if it’s true then you can say close the door and then access the text label from wherever you want and change the text color with [Text.TextColor = Color3.fromRgb(0,0,0) - this is an example

So given a door, and a surface text.

You would want to insert a ClickDetector into Door1 so you would able to trigger a function every time you Click on it. That’s what the detector do. Inside a script, create a function that checks when the detector has been clicked. It will a run a function that will control the properties of the surface text.

You could also, do a condition so your function will check whether the light is Green or Red so it doesn’t confuse it. If-statement then - else. That’s basically the idea you want to have there.