Skip to main content

Keys

Keys are objects that can open Key Doors. Keys and key doors can have their model fully customized.

Use Cases

Keys are used to open any key doors that are in the same group as the key.

Key doors can be used to require the player to pick them up in order to proceed. A key door can be destroyed in multiple ways when opened, based on what the parts inside are named:

Part NameFunction
VanishThe part will fade out, being destroyed after the fade ends.
FallThe part will become unanchored, being destroyed after 10 seconds.
DestroyThe part will simply be destroyed immediately.

Any parts named ReturnKey inside of the key group will cause the key to return to its original spot upon being touched.

Key Configuration

NameDefault ValueDescription
SpinSpeed5How fast the key will spin, measured in radians per second.
Timer0The amount of time you can pick this key up for before it'll return to its original spot. If set to 0, the key will not have a timer
TimerDecimalPlaces1The amount of decimals that will be shown on the timer.
ViewportOffsetCFrame.new(0, 0, 0)Offset applied to the key's model in its viewport when collected.

Door Configuration

NameDefault ValueDescription
RequiredKeys1The amount of keys needed to open the door.