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
 

"attempt to index local 'mouse' (a number value)"

Previous Thread :: Next Thread 
Deidara4 is not online. Deidara4
Joined: 28 May 2009
Total Posts: 283
11 Feb 2012 11:42 PM
So I wanted to make a crosshairs script, but I keep getting the error message "attempt to index local 'mouse' (a number value)". If anyone knows what I'm doing wrong, please help. Sample;

function onChanged(mouse)
if mouse == nil then
print("Mouse not found")
return
end
if script.Parent.Spread.Value > 89 and script.Parent.Spread.Value < 100 then
mouse.Icon = "http://www.roblox.com/asset/?id=72216652"
end
if script.Parent.Spread.Value > 99 and script.Parent.Spread.Value < 110 then
mouse.Icon = "http://www.roblox.com/asset/?id=72216658"
end
if script.Parent.Spread.Value > 109 and script.Parent.Spread.Value < 120 then
mouse.Icon = "http://www.roblox.com/asset/?id=72216666"
end
end
function Dah(mouse)
onChanged(mouse)
end
script.Parent.Spread.Changed:connect(Dah)
Report Abuse
Deidara4 is not online. Deidara4
Joined: 28 May 2009
Total Posts: 283
12 Feb 2012 12:42 AM
ShoopDaBump.
Report Abuse
Phellem is not online. Phellem
Joined: 04 Aug 2011
Total Posts: 1984
12 Feb 2012 12:54 AM
http://wiki.roblox.com/index.php/HopperBin
http://wiki.roblox.com/index.php/Selected_(Event)
http://wiki.roblox.com/index.php/Mouse

mouse can only be obtain by a HopperBin/Tool through Selected/Equipped.
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