NexureNexure
Racing SystemIntegrations

Statebags

Player statebags exposed by the Nexure Racing System.

Statebags provide synchronized state you can read from both client and server scripts.

inRace

  • Type: boolean
  • Default: false
  • Values: true when the player is currently racing, false otherwise.
  • Usage:
local inRace = LocalPlayer.state.inRace
if inRace then
  print('Player is currently racing')
end

raceId

  • Type: number | nil
  • Default: nil
  • Values: Active race ID or nil when not racing.
  • Usage:
local raceId = LocalPlayer.state.raceId
if raceId then
  print(('Player is in race %d'):format(raceId))
end

These statebags are managed internally by Nexure Racing, so avoid mutating them directly to keep racers in sync.

On this page