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
 

Re: Player Mouse

Previous Thread :: Next Thread 
BunnyBoy26 is not online. BunnyBoy26
Joined: 17 Jun 2010
Total Posts: 5674
04 Apr 2013 01:52 PM
I am wondering what the parameters for using this are. I got this straight from the wiki:

game.Players.LocalPlayer:GetMouse().Button2Down:connect(function()
print("Button2 down!")
end)

And it works,but this one that I made:

game.Players.LocalPlayer:GetMouse().KeyDown:connect(function(k)
print(k)
end)

does not. Can I use the KeyDown event or not?
Report Abuse
BunnyBoy26 is not online. BunnyBoy26
Joined: 17 Jun 2010
Total Posts: 5674
04 Apr 2013 02:28 PM
bump?
Report Abuse
Azarth is not online. Azarth
Joined: 17 Aug 2012
Total Posts: 2760
04 Apr 2013 02:30 PM
game.Players.LocalPlayer:GetMouse():connect(function(k)
k.KeyDown:connect(function(key)
print(key)
end)
end)
Report Abuse
BunnyBoy26 is not online. BunnyBoy26
Joined: 17 Jun 2010
Total Posts: 5674
04 Apr 2013 03:01 PM
KeyDown is an event of the mouse.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
04 Apr 2013 03:10 PM
Works for me :P
Report Abuse
BunnyBoy26 is not online. BunnyBoy26
Joined: 17 Jun 2010
Total Posts: 5674
04 Apr 2013 06:15 PM
In Play Solo mode? Do all the buttons you press work?
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
04 Apr 2013 06:17 PM
Your's should work.

(╯°□°)> KMXD
Report Abuse
BunnyBoy26 is not online. BunnyBoy26
Joined: 17 Jun 2010
Total Posts: 5674
04 Apr 2013 08:41 PM
I definitely doesn't. What is wrong?
Report Abuse
BunnyBoy26 is not online. BunnyBoy26
Joined: 17 Jun 2010
Total Posts: 5674
04 Apr 2013 08:42 PM
It*
Report Abuse
EchoReaper is online. EchoReaper
Joined: 14 Oct 2008
Total Posts: 4323
04 Apr 2013 09:51 PM
In the object browser description of the Button2Down event in Mouse, it says "This event is currently non-operational." I don't know how current that is though.
Report Abuse
BunnyBoy26 is not online. BunnyBoy26
Joined: 17 Jun 2010
Total Posts: 5674
04 Apr 2013 10:18 PM
That one works. KeyDown does not.
Report Abuse
OKevinO is not online. OKevinO
Joined: 05 May 2010
Total Posts: 1036
04 Apr 2013 11:02 PM
Try this:

mouse = Game.Players.LocalPlayer:GetMouse()

mouse.KeyDown:connect(function(key)
if key == "F" then
("CODE")
end)
Report Abuse
BunnyBoy26 is not online. BunnyBoy26
Joined: 17 Jun 2010
Total Posts: 5674
07 Apr 2013 06:27 PM
still nothing (and I did put in the 'end').
Report Abuse
OKevinO is not online. OKevinO
Joined: 05 May 2010
Total Posts: 1036
08 Apr 2013 11:26 AM
try to put it in a ScreenGui, i put mine in that and it works, never tried putting it in workspace but it might work.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
08 Apr 2013 11:31 AM
It wont work in Workspace. GetMouse requires it to be inside a local script, and local scripts only run from within a players Backpack, ScreenGui or Character.
Report Abuse
BunnyBoy26 is not online. BunnyBoy26
Joined: 17 Jun 2010
Total Posts: 5674
08 Apr 2013 09:34 PM
I originally put it in a LocalScript in the StarterGui.
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