Skip to main content

RoomChanged

Gets called when player's last known room changes.

Start a script section

!-- OnEvent RoomChanged
-- require @evPlayer *evOldRoom *evNewRoom

# Add your instructions here
  • Group: PlayerEvents
  • Cancellable: No
  • Event data: PlayerRoomChangedEventArgs

Injected variables

VariableTypeDescription
@evPlayerplayer valueGets the player whose last known room changed.
*evOldRoomreference to Room objectGets the old room. May be null if the player just spawned, went through void and such.
*evNewRoomreference to Room objectGets the new room. May be null if the player went into void, died and such.