| |
|
| |
|
| |
|
2eggnog
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 1351 |
|
|
| 05 Aug 2014 10:10 PM |
| You have a health bar and a shield bar. Which one are you referring to? |
|
|
| Report Abuse |
|
|
| |
|
2eggnog
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 1351 |
|
| |
|
2eggnog
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 1351 |
|
|
| 05 Aug 2014 10:18 PM |
| If not, I believe I know the problem. You're probably setting health = humanoid.Health at the very beginning. The variable does not act as a pointer, rather it makes a copy of the value. Each time that piece of code runs, it subtracts from the health until it reaches negative infinity. Instead, refer to humanoid.Health directly or re-declare as a local variable each time. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 06 Aug 2014 08:19 AM |
| Print the values each time the if statement occurs so that you can have a clear view if the values are becoming more like outliers. |
|
|
| Report Abuse |
|
|
| |
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 06 Aug 2014 08:20 AM |
| Therefore you can see what values are needed to be fixed. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 06 Aug 2014 08:26 AM |
| What are the values of those two variables? |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 06 Aug 2014 08:27 AM |
| Maybe the math in it is wrong. The X scale value needs to be numbers between 0 to 1 |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 06 Aug 2014 08:54 AM |
Can you stop asking this. We've already established that you're doing something stupid.
|
|
|
| Report Abuse |
|
|
|
| 06 Aug 2014 09:18 AM |
If the bar is within another frame, then you need to scale it to the max size you want it inside that frame:
i.e 0.8 is 8/10's of the frame it's in
However if it's directly a frame in the ScreenGui, then it will be 8/10's of the local screen. |
|
|
| Report Abuse |
|
|
| |
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 06 Aug 2014 10:00 AM |
| I told u in the first place to print it to identify the problem to check if the number is between 0 and 1 and der u go. |
|
|
| Report Abuse |
|
|