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
 

Mouse is a nil value?

Previous Thread :: Next Thread 
CrazyCorrs is not online. CrazyCorrs
Joined: 09 Jan 2016
Total Posts: 633
28 Nov 2017 01:38 PM
Hello, I have got this script which stats "M2.KeyDown:connect(updateAnimVars)" and M2 is "Local M2 = Player:GetMouse()" Why isn't this working? This is in a Normal script not a Local.
Report Abuse
Camper0008 is not online. Camper0008
Joined: 07 Apr 2013
Total Posts: 2504
28 Nov 2017 01:41 PM
you can only get the player's mouse in a localscript


╴ “I seem to get mentioned alot in videogames.. i wonder why..”
Report Abuse
NodaDuck45 is online. NodaDuck45
Joined: 14 Sep 2017
Total Posts: 47
28 Nov 2017 01:44 PM
^
Report Abuse
Extuls is online. Extuls
Joined: 02 Jan 2009
Total Posts: 5557
28 Nov 2017 01:47 PM
Also KeyDown is deprecated.


Report Abuse
LaeMVP is online. LaeMVP
Joined: 24 Jun 2013
Total Posts: 4416
28 Nov 2017 01:49 PM
i love @extuls

now just start mentioning how connect is deprecated and ill weeb you even more
Report Abuse
CrazyCorrs is not online. CrazyCorrs
Joined: 09 Jan 2016
Total Posts: 633
28 Nov 2017 01:51 PM
Is there a way to do this without a local script? I am trying to make a weapon FE and it's very confusing, I have got so far and I can't get past this problem. I have tried making a local script and putting parts in it but it isn't having any of it?
Report Abuse
LaeMVP is online. LaeMVP
Joined: 24 Jun 2013
Total Posts: 4416
28 Nov 2017 01:53 PM
It sounds like you're doing animations for this so it should be done on the client, in a localscript, anyways

also UserInputService.InputBegan instead of KeyDown, there was a reason KeyDown was deprecated, it does it's job poorly compared to the modern options
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