How to make an Bar system (Not Health Bar and not even Stamina)

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve?
    Simple Bar System that depends of an Value and Update every time the value changes

I know its something simple but i never learned it

2 Likes

Uhhhhhh I don’t understand a single thing you said. Please elaborate more.

No one’s gonna understand your definition of “bar system” if you don’t explain it.

i mean, like this
bart

I get what you mean.

Basically to do it, you need a GUI with a frame that can have the X Scale size to go up to 1 to fill in a bar.
You’d need to two values, the total amount and the current amount.

With these two values, you can do some simple maths and get a number between 0 and 1.

local currentAmount = 50
local maximumAmount = 100

local percent = (currentAmount / maxiumumAmount)

BarFrame.Size = UDim2.new(percent, 0, 1, 0)

I’m not the best at explaining things but thats pretty much the basic way of doing it.

RBXM file for a GUI with the above code.
percentBar.rbxm (3.3 KB)

there is an pretty good tutorial about it. You just have to consider the health variable

the bar exceeds its limit when it is at 100%

image

Send a screenshot of the properties, you probably messed up the size of the UI.

image

I didn’t know that the bar had to be inside the background, thanks for clearing my doubt! :slight_smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.