How can I make a progress bar for my obby game?

I want to make a progress bar for my obby game but I can’t figure out how. Anyone know how to make one? Any help is appreciated :slight_smile:

You can set the X value of the size of the bar to be the stage divided by 10 or something like that. I haven’t scripted in like 3 months so I’m refreshing.

So you’d have a frame inside the progress frame. You would change the Size SCALE to

Size = Udim2.new((StageAmount/StagesComplete),0,Size.Y,0)

:slight_smile:

Yeah this is what I was going for, the ratio of the current stage to the final stage should be able to get an accurate bar.

Script for the progress bar:

--//Services
local Players = game:GetService("Players")

--//Variables
local LocalPlayer = Players.LocalPlayer
local Bar = script.Parent

--//Controls
local STAGE_AMOUNT = 50

--//Functions
Bar.Size = UDim2.new(LocalPlayer.StageValue.Value/STAGE_AMOUNT, 0, 1, 0) --//Reference the player's stage value

LocalPlayer.StageValue:GetPropertyChangedSignal("Value"):Connect(function()
	Bar.Size = UDim2.new(LocalPlayer.StageValue.Value/STAGE_AMOUNT, 0, 1, 0) --//Reference the player's stage value
end)

Placefile:
devforum help (15).rbxl (34.8 KB)

3 Likes