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 » Scripting Helpers
Home Search
 

Can't use numbers?

Previous Thread :: Next Thread 
HillBilly9843 is not online. HillBilly9843
Joined: 05 Jan 2009
Total Posts: 7870
31 Jul 2011 02:06 PM
In these few lines of code, everything would work right. But it wont let me use reload because its a number. Output says so, but Ive seen it done before. This is in a gun.

local reload = Tool.Reload.Value
reload = reload- 1
Tool.Name = "Pistol (" reload ")"
Report Abuse
myrco919 is not online. myrco919
Joined: 12 Jun 2009
Total Posts: 13241
31 Jul 2011 02:07 PM
[ Content Deleted ]
Report Abuse
5943539 is not online. 5943539
Joined: 05 Jan 2010
Total Posts: 810
31 Jul 2011 02:09 PM
Setting a variable to a property and changing it changes the variable...

local reload=Tool.Reload
reload.Value=reload.Value-1
Tool.name="Pistol ("..reload.Value..")"
Report Abuse
HillBilly9843 is not online. HillBilly9843
Joined: 05 Jan 2009
Total Posts: 7870
31 Jul 2011 02:10 PM
It works, but only for one shot. The value also doesnt even go down any.
Report Abuse
HillBilly9843 is not online. HillBilly9843
Joined: 05 Jan 2009
Total Posts: 7870
31 Jul 2011 02:16 PM
Wait, 594 fixed it. But why doesnt the whole thing work?

local reload = Tool.Reload
reload.Value = reload.Value- 1
Tool.Name = "Pistol ("..reload.Value..")"
if reload.Value == 0 then
enabled = false
reload.Value = 20
Tool.Name = "Pistol (" ..reload.Value.. ")"
wait(2)
enabled = true
end
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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