Skip to Content
RacingScript integrationClient exports

Client Exports

Tablet

ToggleTablet

Opens, closes, or toggles the standalone racing tablet. This export has no effect when the standalone tablet is disabled.

---@param open? boolean # Whether to open or close the tablet. If nil, it toggles. exports["lb-racing"]:ToggleTablet(open)

Apps

RemoveApp

Removes the LB Racing app from LB Phone and LB Tablet for the local player.

exports["lb-racing"]:RemoveApp()

AddApp

Allows the LB Racing app to be added again and refreshes the available apps for the local player. Other requirements in Config.App, such as the required item or blacklisted jobs, still apply.

exports["lb-racing"]:AddApp()

Track creator

IsCreatingTrack

---@return boolean local isCreatingTrack = exports["lb-racing"]:IsCreatingTrack()

Race

IsInRace

Returns whether the local player is in an active race and, if so, its ID.

---@return boolean isInRace ---@return number? raceId local isInRace, raceId = exports["lb-racing"]:IsInRace()

GetCurrentCheckpoint

Returns the local player’s current checkpoint index, or nil when they are not in a race.

---@return number? checkpointIndex local checkpointIndex = exports["lb-racing"]:GetCurrentCheckpoint()

GetCheckpoints

Returns the active race checkpoints, or nil when the local player is not in a race. A checkpoint is either a center position or a pair of positions representing its left and right sides.

---@return ([vector3, vector3] | vector3)[]? checkpoints local checkpoints = exports["lb-racing"]:GetCheckpoints()

GetCheckpointCenter

Returns the center of a checkpoint in the active race. Checkpoint indexes are one-based.

---@param checkpointIndex number ---@return vector3? center local center = exports["lb-racing"]:GetCheckpointCenter(checkpointIndex)