djboy
|
  |
| Joined: 16 Mar 2008 |
| Total Posts: 794 |
|
|
| 17 Jan 2015 03:08 PM |
How would I on a computer find the value of x to equal 5?
[5 = Humanoid.MaxHealth/x]
and just say the MaxHealth was 100 it would find [x = 20]
How would i perform this on roblox scritping? |
|
|
| Report Abuse |
|
|
LucasLua
|
  |
| Joined: 18 Jun 2008 |
| Total Posts: 7386 |
|
| |
|
djboy
|
  |
| Joined: 16 Mar 2008 |
| Total Posts: 794 |
|
|
| 17 Jan 2015 03:12 PM |
| That would not get what i want. x HAS to be 5 |
|
|
| Report Abuse |
|
|
LucasLua
|
  |
| Joined: 18 Jun 2008 |
| Total Posts: 7386 |
|
|
| 17 Jan 2015 03:12 PM |
I used basic algrebra -
Multiply both sides by X to move X to the other side, and divide both sides by 5 to move 5 to the other side. |
|
|
| Report Abuse |
|
|
djboy
|
  |
| Joined: 16 Mar 2008 |
| Total Posts: 794 |
|
|
| 17 Jan 2015 03:13 PM |
| But that is also not telling me how to do that in roblox.... |
|
|
| Report Abuse |
|
|
LucasLua
|
  |
| Joined: 18 Jun 2008 |
| Total Posts: 7386 |
|
|
| 17 Jan 2015 03:13 PM |
MaxHealth = 100
print(MaxHealth / 5)
> 20
MaxHealth = 42
print(MaxHealth / 5)
> 8.4
print(100 / 20)
> 5
print(42 / 8.4)
> 5
|
|
|
| Report Abuse |
|
|
djboy
|
  |
| Joined: 16 Mar 2008 |
| Total Posts: 794 |
|
|
| 17 Jan 2015 03:22 PM |
That is not exactly what i want...
So just say the Max HP is 200 i need a way to find out what number Multiplyed by 200 is equal to 500. |
|
|
| Report Abuse |
|
|
| |
|
djboy
|
  |
| Joined: 16 Mar 2008 |
| Total Posts: 794 |
|
| |
|