ProgressBar

A progress bar shown on a player's HUD.

For examples on how to use, refer to UIService.

Functions

setColor(color: 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)

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

removePlayer(player: Player)

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

destroy()

Removes the progress bar.

Last updated