|
| 18 Feb 2017 02:31 PM |
| I have a NumberValue that decreases depending on a players weapon ammo. How come I get the following number instead of 0: -7.5286998857393428e-016 |
|
|
| Report Abuse |
|
|
| |
|
|
| 18 Feb 2017 02:57 PM |
| #################################################################### |
|
|
| Report Abuse |
|
|
|
| 18 Feb 2017 03:01 PM |
Show the script?
How are we supposed to know what's happening? lol
|
|
|
| Report Abuse |
|
|
|
| 18 Feb 2017 03:19 PM |
bin = script.Parent
Ink_Value = script.Parent.Parent.Parent.Parent.Ink_Ammount Special_Charge = script.Parent.Parent.Parent.Parent.Ink_Ammount.Special_Charge
function onTouched(part) if part.Name == "Inkable_Surface" or part.Name == "Wall" then if Ink_Value.Value <= 0 then print("Nothing") elseif Ink_Value.Value ~= 0 then Ink_Value.Value = Ink_Value.Value - 0.01 Special_Charge.Value = Special_Charge.Value + 1 part.BrickColor = script.Parent.BrickColor part.Material = script.Parent.Material part.Transparency = 0 end end end
connection = bin.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
|
| 18 Feb 2017 03:20 PM |
| string.sub(ammunation, 1, 1) |
|
|
| Report Abuse |
|
|
| |
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
| |
|
|
| 18 Feb 2017 03:23 PM |
TimeTicks has the correct method
It will round off a decimal number to its nearest whole number |
|
|
| Report Abuse |
|
|