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: pleasehelp me

Previous Thread :: Next Thread 
VuIpine is not online. VuIpine
Joined: 25 Jul 2015
Total Posts: 881
27 Jul 2017 05:43 PM
1. FE is on
2. it is localscript


mouse = game.Players:GetMouse()

mouse.MouseButton1Down:Connect(function(key)
if key == "r" then
print("key = "..key)
en
end)
Report Abuse
FuzzBuzzAl54 is not online. FuzzBuzzAl54
Joined: 07 Jul 2016
Total Posts: 1
27 Jul 2017 05:44 PM
try pressing "r"
maybe it will help
Report Abuse
DesignerDavid is online. DesignerDavid
Joined: 18 Feb 2014
Total Posts: 8422
27 Jul 2017 05:46 PM
you forgot to finish the "end" to the if statement.
Report Abuse
nullfeels is not online. nullfeels
Joined: 31 Mar 2017
Total Posts: 1215
27 Jul 2017 05:47 PM
"mouse = game.Players:GetMouse()" to "mouse = game.Players.LocalPlayer:GetMouse()"
Report Abuse
Haggie125 is not online. Haggie125
Joined: 02 Apr 2008
Total Posts: 761
27 Jul 2017 05:48 PM
I don't see your logic. You've got an event that fires when the player presses the left mouse button, where would the key come from?
Report Abuse
EataPig98 is not online. EataPig98
Joined: 01 Mar 2014
Total Posts: 173
27 Jul 2017 05:49 PM
mouse = game.Players:GetMouse()

mouse.KeyDown:connect(function(key)
if (key == "r") then
print("key = "..key)
end
end)



screw roblox updates
Report Abuse
VuIpine is not online. VuIpine
Joined: 25 Jul 2015
Total Posts: 881
27 Jul 2017 05:51 PM
didnt work
Report Abuse
Haggie125 is not online. Haggie125
Joined: 02 Apr 2008
Total Posts: 761
27 Jul 2017 05:53 PM
Use UserInputService it's better

local UIS = game:GetService("UserInputService")
UIS.InputBegan:connect(function(Obj, gameProcessedEvent)
if Obj.KeyCode == Enum.KeyCode.R then
print(tostring(Obj.KeyCode))
end
end
Report Abuse
VuIpine is not online. VuIpine
Joined: 25 Jul 2015
Total Posts: 881
27 Jul 2017 05:54 PM
no dummy i want to use what i did
Report Abuse
nullfeels is not online. nullfeels
Joined: 31 Mar 2017
Total Posts: 1215
27 Jul 2017 05:56 PM
Whoa! I don't think anyone is gonna help you with that attitude.
Report Abuse
BaiYuni is not online. BaiYuni
Joined: 09 Oct 2009
Total Posts: 2861
27 Jul 2017 05:58 PM
mouse = game.Players.LocalPlayer:GetMouse()

mouse.KeyDown:connect(function(key)
if (key == "r") then
print("key = "..key)
end
end)
Report Abuse
SingleSided is online. SingleSided
Joined: 23 Mar 2012
Total Posts: 1241
27 Jul 2017 06:03 PM
KeyDown is deprecated, I suggest using UserInputService.

http://wiki.roblox.com/index.php?title=Keyboard_input_(deprecated)
Report Abuse
BaiYuni is not online. BaiYuni
Joined: 09 Oct 2009
Total Posts: 2861
27 Jul 2017 06:11 PM
Yes, obviously it's better to use UserInputService, but OP wants to do it his own way.
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