|
| 29 Mar 2013 07:11 PM |
| can someone teach me how to make a bar that fills, and decreases according to certain number, like the health |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2013 07:11 PM |
I saw a script earlier today, and it's on offset based...
|
|
|
| Report Abuse |
|
|
|
| 29 Mar 2013 07:13 PM |
| so it decreases and increases via offset? |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2013 07:15 PM |
Yes But it had food with it that made it increase by offset
|
|
|
| Report Abuse |
|
|
|
| 29 Mar 2013 07:16 PM |
| ok, I understand that... but how can I base it off a number? like 100 going down to 0? |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2013 07:18 PM |
I'm not sure. But I need to study that stuff more. It's so confusing, you should go to freemodels and type health bar gui. You can also look in the preset roblox health gui |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2013 07:46 PM |
| that doesn't really help -_- |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2013 08:51 PM |
Here, put this into a PlayerGui. I just made this.
local screen = Instance.new "ScreenGui"
local back = Instance.new "Frame" back.Size = UDim2.new(0,400,0,30) back.Position = UDim2.new(0.5, -200, 0.5, -15) back.BackgroundColor3 = Color3.new(0.75,0,0) back.Parent = screen
local front = Instance.new "Frame" front.BackgroundColor3 = Color3.new(0, 0.75, 0) front.Parent = back
local text = Instance.new "TextLabel" text.Size = UDim2.new(1,0,1,0) text.BackgroundTransparency = 1 text.Text = "0%"
screen.Parent = script.Parent.Parent
local function setPercent(num) if num < 0 or num > 100 then return nil end local percent = num/100 front.Size = UDim2.new(percent,0,1,0) text.Text = num .. "%" end
local i = 0 local add = true while wait() do if i < 0 then i = 0 elseif i > 100 then i = 100 end setPercent(i) if add then if i < 100 then i = i + 1 else i = 99 add = false end else if i > 0 then i = i - 1 else i = 1 add = true end end end |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2013 09:12 PM |
| thanks, but it didn't work... I'm just looking inside the busterbluster gui.... |
|
|
| Report Abuse |
|
|
th3oracle
|
  |
| Joined: 23 Feb 2013 |
| Total Posts: 448 |
|
|
| 29 Mar 2013 09:14 PM |
| Can't you just change the size of the bar? |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2013 10:00 PM |
| Well, run it in a player. Examine how I got it to work. |
|
|
| Report Abuse |
|
|