> ## Documentation Index
> Fetch the complete documentation index at: https://luau.limerence.biz/llms.txt
> Use this file to discover all available pages before exploring further.

# State

> Read what the legitbot is doing: targets, scope, and fire state.

Read-only getters for what the legitbot is doing this frame. Every call returns the current value the moment you call it.

| Call                              | Returns                       | What it tells you                                                                                                                                                                                                                 |
| --------------------------------- | ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `getTarget()`                     | `{ player, part?, hitbox? }?` | Who the aim is locked on right now. `nil` if nothing.                                                                                                                                                                             |
| `getTriggerTarget()`              | `{ player, part?, hitbox? }?` | Who the triggerbot is currently lined up on.                                                                                                                                                                                      |
| `getValidTargets()`               | `{ TargetSnapshot }`          | Everyone the legitbot considers a valid target this frame: already accounts for team, FOV, hitbox limits, and your own filters.                                                                                                   |
| `getActiveScope()`                | `string`                      | The current settings scope (e.g. `"weapon:ak47"`, `"group:rifle"`, or `"global"`).                                                                                                                                                |
| `getResolvedValue(key, scopeId?)` | `any`                         | The legitbot's current value for a setting, respecting any per-weapon overrides. Use this instead of reading the raw slider with `api.ui.find`, which only gives you the global value; this gives you what the bot actually uses. |
| `isFiring()`                      | `boolean`                     | `true` if the triggerbot has fired in the last \~100ms.                                                                                                                                                                           |
| `getBurstRemaining()`             | `number?`                     | How many shots are left in a current burst, or `nil` if not in a burst.                                                                                                                                                           |
| `getLastShotTime()`               | `number?`                     | `os.clock()` of the last triggerbot shot.                                                                                                                                                                                         |

See [TargetSnapshot](/reference/types#legitbot-types) for the table `getValidTargets()` returns. Its `hitbox` field is one of `"Head"`, `"Torso"`, `"Arms"`, `"Legs"`, or `"Feet"`, and the same values appear on the `hitbox` field of the target, trigger, and shot events.

<CardGroup cols={2}>
  <Card title="Signals" icon="bell" href="/legitbot/signals" />

  <Card title="Influence" icon="sliders" href="/legitbot/influence" />
</CardGroup>
