Player:Flashlight
Description
Enables/Disables the player's flashlight.
Player:CanUseFlashlight must be true in order for the player's flashlight to be changed. GM:PlayerSwitchFlashlight can block this function.
Added in 2025.11.12, the
gmod_flashlight attachment is used as a source for the player's flashlight. In thirdperson, the playermodel and weapon worldmodel are checked; in firstperson, the viewmodel is checked. If the attachment isn't found, default engine functionality is used.
The light sprite attached to the playermodel when the flashlight is on will also follow the playermodel's gmod_flashlight attachment if it exists.
Arguments
Example
Turns off and disables the player's flashlight
Garry's Mod
Rust
Steamworks
Wiki Help