Skip to main content
Rivals only. On Rivals, api.game gives you match / environment / placeable info instead of bomb / hostage. Every getter returns the current value the moment you call it.

Getters

CallReturnsWhat it tells you
isInGame()booleantrue while you’re in an active match (not the lobby).
getTeamId()stringYour team id ("" when none).
getEnvironmentId()stringYour current environment/zone id ("" when none).
getPlaceables(){ PlaceableEntry }Every tracked placeable in the world right now.
getPlaceable(id)PlaceableEntry?One placeable by its id, or nil.
See PlaceableEntry.

Signals

Call :Connect(callback) on these. They get cleaned up when your script unloads.
SignalWhen your callback runs
onInGameChanged(inGame): you entered or left a match
onTeamChanged(teamId): your team id changed
onEnvironmentChanged(environmentId): your environment changed
onPlaceableAdded(id, placeable): a placeable appeared
onPlaceableRemoved(id, placeable): a placeable was removed

Example

if api.game.getPlaceables then
    api.game.onPlaceableAdded:Connect(function(id, placeable)
        if not placeable.friendly then
            print("enemy placeable:", placeable.kind, "at", placeable.position)
        end
    end)
end