Skip to content

Locked door ​

A door only someone holding the key can open. Clicking without the key shows "You need the key" on a sign.

You need ​

  • A key (an object with VRC Pickup)
  • The door (clicked) and the door panel to hide
  • A sign for the message (TextMeshPro)

The door's trigger ​

Add a Tripwire Trigger to the door with this variable.

NameTypeSync
has keyOn/OffNot synced
WhenInteract⋯
What to do
If⋯
Conditionhas key is On
Then
Set Active⋯
Targets Door Panel
Show Off
Else
Set Text⋯
Targets Sign
Text You need the key
+ Add what to do

The key's trigger ​

Add a Tripwire Trigger to the key that sets the door's variable when picked up.

WhenOn Pickup⋯
What to do
Set Another Trigger's Variable⋯
TriggerDoor
Its variablehas key
ValueOn
+ Add what to do

The variable isn't synced, so it turns on only for the player who picked up the key, and the door opens only on their screen.

Opening it for everyone ​

Keep "has key" as it is, and keep the door's state in a separate synced variable: set it under Then, and hide the panel from On Variable Changed, as in A switch everyone shares.