Skip to main content
Bridge.Progress shows a timed progress bar and blocks until it fills or is cancelled. Use it for any timed action — reeling in a fish, picking a lock, washing a car. It can attach a prop, play an animation or scenario, and lock movement for the duration, then tear all of that down for you when the bar ends.

Availability

Client only. Call it inside a thread, command, or event callback — it yields.
local completed = Bridge.Progress(opts)   -- boolean
Bridge.Progress.Cancel()                   -- force-cancel from elsewhere
Bridge.Progress.IsActive()                 -- boolean (always false on the own renderer)

Signature

Bridge.Progress(opts) — the call blocks and returns whether the bar completed.
duration
number
required
How long the bar takes to fill, in milliseconds.
label
string
The text shown beside the bar.
icon
string
An optional leading icon.
canCancel
boolean
default:"false"
When true, the player can cancel (a close button appears); the call then returns false.
disableControls
boolean
default:"false"
Locks movement, sprint, jump, and attack for the duration.
prop
table
A single prop to attach for the duration: { model, bone?, pos?, rot? }. bone defaults to 60309 (right hand); pos/rot are { x, y, z } offsets.
props
table[]
Multiple props, each shaped like prop above. Use instead of prop when you need more than one.
anim
table
An animation to play: { dict, clip, flag?, blendIn?, blendOut?, duration? }. flag defaults to 49.
scenario
string
A scenario to play instead of anim, e.g. 'WORLD_HUMAN_STAND_FISHING'.

Returns

completed
boolean
true if the bar filled to 100%, false if the player (or a Bridge.Progress.Cancel() call) cancelled it.
The props, animation/scenario, and control lock are cleaned up automatically whether the bar completes or cancels.

Examples

CreateThread(function()
    local ok = Bridge.Progress({ label = 'Searching…', duration = 3000, canCancel = true })
    if ok then findLoot() end
end)
Bridge.Progress yields. Always call it inside a CreateThread, command, or event callback — never at file top level.
The bar fill uses the player’s theme accent automatically. Set atlas:ui "ox" (or atlas:ui:progress "ox") to render the same call through ox_lib’s progress bar instead.