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: Question

Previous Thread :: Next Thread 
ColinRocks99 is not online. ColinRocks99
Joined: 04 May 2013
Total Posts: 1533
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
ColinRocks99 is not online. ColinRocks99
Joined: 04 May 2013
Total Posts: 1533
18 Feb 2017 02:55 PM
( pls )
Report Abuse
Intended_Pun is not online. Intended_Pun
Joined: 10 Aug 2016
Total Posts: 4384
18 Feb 2017 02:57 PM
####################################################################
Report Abuse
iiTylerSoul is not online. iiTylerSoul
Joined: 29 Jun 2015
Total Posts: 178
18 Feb 2017 03:01 PM
Show the script?

How are we supposed to know what's happening? lol


Report Abuse
ColinRocks99 is not online. ColinRocks99
Joined: 04 May 2013
Total Posts: 1533
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
Gomlsauresrex is not online. Gomlsauresrex
Joined: 25 Mar 2016
Total Posts: 3588
18 Feb 2017 03:20 PM
string.sub(ammunation, 1, 1)
Report Abuse
Gomlsauresrex is not online. Gomlsauresrex
Joined: 25 Mar 2016
Total Posts: 3588
18 Feb 2017 03:21 PM
nvm I dont read much.
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
18 Feb 2017 03:21 PM
math.floor


Report Abuse
Gomlsauresrex is not online. Gomlsauresrex
Joined: 25 Mar 2016
Total Posts: 3588
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
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