Pooglies
(Pooglies)
August 29, 2024, 4:01pm
#1
Im tweaking the roblox car system and adding gas to it, but the sizing is all messed up for the bar that shows your fuel, i set the fuel at 5000 and the gas sizes itself to that, how would
||local gas = engine:GetAttribute(Constants.ENGINE_GAS_ATTRIBUTE)|
|---|---|
||gui.Speedometer.GasFrame.Gas.Bar.Size = UDim2.fromScale(gas * 1/gas, 1)|
this is whats sizing it, like I said i have it set at 5000 for fuel value
Bikereh
(green_lady)
August 29, 2024, 4:10pm
#2
im not sure what the problem is, but there is a really easy tutorial for custom bars right here
Hello everyone!
In this brief tutorial I will explain how to get a loading bar/health bar effect like these:
[image]
[image]
[image]
And
[image]
HOW TO CREATE ROUNDED LOADING BAR
Firstly, create a Frame called “FrameBase”. Put a UICorner in it to make it rounded. Change the BackgroundColor3 to whatever color you want.
[image]
[image]
Next, insert a Frame called “Clipping”.
[image]
Set these properties on this clipping frame:
[image]
[image]
[image]
Now, insert another Frame …
1 Like
Pooglies
(Pooglies)
August 29, 2024, 4:11pm
#3
basically with the gas being at 5000, it wants to set the size of x on the bar to 5000, making it not show it deplition when driving
Bikereh
(green_lady)
August 29, 2024, 4:13pm
#4
ohhh okkkkk, hmm. i would still follow the tutorial its just a few lines of code. it has exaclty what you need.
I’m pretty sure that you would want to do (Gas/MaxGas) * MaxBarSize
system
(system)
Closed
September 12, 2024, 4:17pm
#6
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.