Sets a progress bar to any 0–1 value with a smooth tween or an optional spring bounce. Supports both the minimal single-bar layout and a full fill-container layout.
ProgressBarService.Set() is a single-function API. It locates the correct fill element automatically by checking for a Bar child (minimal mode) or a Fill_Container.Fill hierarchy (regular mode), then tweens its X-axis scale to the target percentage.
quad easing
Properties
ProgressBarService.Set(script.Parent.Bar, 0.6)
Minimal setup — tween to 75%
Instant set — no tween (e.g. on init)
Spring bounce effect
Drive the bar from a loop, updating it in real time. The tween time is 0.3s by default so frequent updates look smooth without jumping.
Real-time asset preload progress
Minimal layout: a Frame with a direct child named Bar whose Size.X.Scale is driven by the service. Regular layout: a Frame with Fill_Container > Fill where Fill is sized. The service auto-detects which layout is present.
| Prop | Type | Default | Description |
|---|---|---|---|
| barObject | Frame | — | Root frame of the progress bar. Must have a Bar or Fill_Container.Fill child. |
| percent | number | — | Target fill amount, clamped 0–1. |
| instant | boolean | false | If true, sets the size immediately without tweening. |
| opts.spring | boolean | false | Uses Enum.EasingStyle.Back (overshoot) instead of Quad for a springy feel. |