Skip to main content

TogglingNoclip

Gets called when the player is attempting to toggle noclip (pressed alt).

Start a script section

!-- OnEvent TogglingNoclip
-- require @evPlayer $evNewNoclipState $evIsAllowed

# Add your instructions here
  • Group: PlayerEvents
  • Cancellable: Yes
  • Event data: PlayerTogglingNoclipEventArgs

Injected variables

VariableTypeDescription
@evPlayerplayer valueGets the player who is attempting to toggle noclip.
$evNewNoclipStatebool valueGets or sets the new state that will be applied to the noclip flag.
$evIsAllowedbool valueWhether the event is allowed to run.
Remarks: This value is assigned on based on whether the player has noclip permitted. So it may not be allowed by default for some players.