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 » Scripters
Home Search
 

Re: Health bar stuff

Previous Thread :: Next Thread 
badfitz67 is not online. badfitz67
Joined: 03 Jun 2010
Total Posts: 13165
29 May 2016 06:52 AM
for my game, the tanks need health bars, which are displayed on a GUI.

everything works fine but I need to health bars to resize from the left to right (like this:
https://twitter.com/DucktorCid/status/736887584606040064
)

but the tank on the right resizes from right to left (like this:
https://twitter.com/DucktorCid/status/736887654759997440
)


to fix this, i've tried placing the bar to the right by the amount of health taken off already (or atleast that's what i think this line of code is doing):

bar.Position = UDim2.new((100-val)/100,0,0,0)

(100 being the maxHealth of the tank, val being the current health)

but it doesn't work (bar comes off the side of the backing etc).

Can anyone help me fix this?


Every time I die, I hope they're digging at my grave!
Report Abuse
badfitz67 is not online. badfitz67
Joined: 03 Jun 2010
Total Posts: 13165
29 May 2016 07:14 AM
b


Every time I die, I hope they're digging at my grave!
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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