generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: a bar that decreases

Previous Thread :: Next Thread 
COMMANDERREX12345345 is not online. COMMANDERREX12345345
Joined: 18 Jun 2009
Total Posts: 1316
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
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
29 Mar 2013 07:11 PM
I saw a script earlier today, and it's on offset based...
Report Abuse
COMMANDERREX12345345 is not online. COMMANDERREX12345345
Joined: 18 Jun 2009
Total Posts: 1316
29 Mar 2013 07:13 PM
so it decreases and increases via offset?
Report Abuse
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
29 Mar 2013 07:15 PM
Yes
But it had food with it that made it increase by offset
Report Abuse
COMMANDERREX12345345 is not online. COMMANDERREX12345345
Joined: 18 Jun 2009
Total Posts: 1316
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
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
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
COMMANDERREX12345345 is not online. COMMANDERREX12345345
Joined: 18 Jun 2009
Total Posts: 1316
29 Mar 2013 07:46 PM
that doesn't really help -_-
Report Abuse
ArbiterOfDeath is not online. ArbiterOfDeath
Joined: 20 Jun 2011
Total Posts: 1458
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
COMMANDERREX12345345 is not online. COMMANDERREX12345345
Joined: 18 Jun 2009
Total Posts: 1316
29 Mar 2013 09:12 PM
thanks, but it didn't work... I'm just looking inside the busterbluster gui....
Report Abuse
th3oracle is not online. 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
ArbiterOfDeath is not online. ArbiterOfDeath
Joined: 20 Jun 2011
Total Posts: 1458
29 Mar 2013 10:00 PM
Well, run it in a player. Examine how I got it to work.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image