πState bags
Player
phoneOpen
Returns boolean - whether the phone is open for the player
-- Read state bag
local isOpen = LocalPlayer.state.phoneOpen-- Read state bag
local isOpen = Player(source).state.phoneOpenAddStateBagChangeHandler('phoneOpen', ('player:%s'):format(cache.serverId), function(_, _, value)
-- State bag handler automatically syncs PhoneOpen property
print('[StateBag] phoneOpen changed:', value)
end)softOpen
Returns boolean - whether the phone is soft open for the player
phoneDisabled
Returns boolean - whether the phone is disabled for the player
airplaneMode
Returns boolean - whether airplane mode is enabled for the player
inCall
Returns boolean - whether the player is currently in a call
callId
Returns number | nil - the current call ID if player is in a call, nil otherwise
callStatus
Returns table | nil - object containing full call details, nil if not in call
batteryLevel
Returns number - the current battery level (0-100) for the player's phone
Notes
Last updated