S.O.S Forge Scripting

hi i need help,
I have a map that i am currently working on and the idea is a prison map and i want to have ray shields like from star wars so for those of who dont know what that is or what im saying is that i would like to have a door/shield when i spawn in the door isn’t there and i would like to have a button so i can close/turn on the shield door then push the same button and open/turn off the door/shield i hope someone can help me buy telling me how to script it or a link to a video or a GT for a prefab.

thank you
**~**PeptiCargo036

It’s been awhile but what I remember is setting a switch to:
Interaction
Powerstate- toggle

Afterwards you would need to set the door to move when toggled on and reset position when toggled off. Sorry I wasn’t the best help is it’s pretty vague.

see the button is fine i think but the door i want it to not be there when the round starts the when i push the button it will appear and when i push the same button it will disappear

You would need the door to be set to:
On match start-despawn
Afterwards set the door to spawn once the button is pressed instead of move.

The other option would be to adjust the door after its scripted so that it will be hidden at the start and then move when the button is pressed.

If you’re still trying to get this to work, here is a script…

DOOR SCRIPT

> SCRIPT 1 -
> Power State Check: On
> Spawn (Force: On)
> The Spawn Can be Changed to Position Reset as well to achieve a more Aesthetic resultSCRIPT 2 -
> Power State Check: Off
> Despawn (THIS)
> The Despawn Can be Changed to Move Offset and/or Rotation Offset for a more Aesthetic result aswell

SWITCH/BUTTON SCRIPT

> SCRIPT 1 -
> Interacted:
> Power State Set: Toggle
>
> SCRIPT 2 -
> Round Start:
> Power State Set: Off

Hopefully this Helps.

it really did thank you

> 2533274925951063;6:
> it really did thank you

Im glad you were able to find help!