-
Notifications
You must be signed in to change notification settings - Fork 0
Logic API
LateAlways edited this page Nov 12, 2024
·
6 revisions
The Logic API contains all functions related to game mechanics.
Returns the player which is in duo or in team with the local player. In case the client is not in the duos gamemode, this function always returns
false.
function bpAPI.logicAPI.getDuo(): Player | nil | falseReturns the given player's or the local player's knife.
function bpAPI.logicAPI.hasKnife(player: Player?): Tool | nilReturns whether the given player or the local player is sitting.
function bpAPI.logicAPI.isSit(player: Player?): booleanReturns whether a
Instancetype or aVector3is inside of the glass. Returnsnilif the object given is neither.
function bpAPI.logicAPI.isInGlass(InstanceOrVector3: Instance | Vector3): boolean | nilReturns whether or not the local player has won the game.
function bpAPI.logicAPI.hasWon(): booleanThrows the knife at the given CoordinateFrame. (
CFrame)
function bpAPI.logicAPI.throw(target: CFrame)Fires the stab handler inside of the client script.
function bpAPI.logicAPI.slash()Returns whether or not the local player is in cooldown.
function bpAPI.logicAPI.isThrowing(): booleanReturns whether or not a
Charactercan be attacked.
function bpAPI.logicAPI.allow(character: Character): boolean