Statebags

All states are client side only

invBusy

Returns whether the player's inventory is currently running an action (i.e. using an item). Can be set to true to disable opening the inventory.

type

invBusy

boolean

example

local invBusy = LocalPlayer.state.invBusy
 
if invBusy then
    -- Do stuff when busy
else
    -- Do stuff when not busy
end

Disable opening inventory

LocalPlayer.state.invBusy = true

invHotkeys

Allows you to enable/disable a player's access to inventory hotkeys.

type

invHotkeys

boolean

example


invOpen

Returns whether the player's inventory is currently open or not.

type

invOpen

boolean

example


canUseWeapons

Allows you to enable/disable the use of weapons for a player.

Last updated