# ProgressBar

For examples on how to use, refer to [UIService](/scripting/bedwars-scripting/services/uiservice.md).

### Functions

#### setColor(color: [Color3](https://create.roblox.com/docs/reference/engine/datatypes/Color3))

Sets the fill color of the progress bar.

#### setMaxProgress(max: number)

Sets the max progress for the progress bar.

#### setText(text: string)

Sets a text label on the progress bar.

#### get(): number

Returns the current progress of the progress bar. For example, a progress bar that has 1 unit of progress with a maximum of 5 units would return `1`.

#### add(amount: number)

Adds the given amount to the current progress.

#### sub(amount: number)

Subtracts the given amount from the current progress.

#### set(amount: number)

Sets the progress to the given amount.

#### addPlayer(player: [Player](/scripting/bedwars-scripting/objects/player.md))

Adds a player to the list of players who can view this progress bar.

#### removePlayer(player: [Player](/scripting/bedwars-scripting/objects/player.md))

Removes a player from the list of players who can view this progress bar.

#### destroy()

Removes the progress bar.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.easy.gg/scripting/bedwars-scripting/objects/progressbar.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
