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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Keydown event

Previous Thread :: Next Thread 
citymaster22 is not online. citymaster22
Joined: 10 Jan 2010
Total Posts: 4993
05 Aug 2011 08:17 AM
I know there is a way to get the use the KeyDown event via LocalScript (no tool). Can someone tell me how?
Report Abuse
UttermostExedra is not online. UttermostExedra
Joined: 28 Dec 2009
Total Posts: 2483
05 Aug 2011 08:19 AM
No, I don't think so. You can force-equip and remove the hopperbin though.
Report Abuse
BloxBuilder900 is not online. BloxBuilder900
Joined: 31 Mar 2009
Total Posts: 2231
05 Aug 2011 08:20 AM
function getMouse()
local tool,handle,M = Instance.new("Tool"),Instance.new("Part")
handle.Name,handle.Anchored,handle.Parent = "Handle",true,tool
tool.Equipped:connect(function(m) M = m tool:remove() tool = nil end)
while (not player.Character) do wait() end
tool.Parent = player.Character
while (tool) do wait() end
return M
end
local m = getMouse()

crazyman32's work :P
Report Abuse
myrco1001 is not online. myrco1001
Joined: 17 Sep 2010
Total Posts: 2574
05 Aug 2011 08:20 AM
First you have to get the mouse:

local mouse = nil
local tool = Instance.new("Tool")
local han = Instance.new("Part", tool)
han.Name = "Handle"
tool.Equipped:connect(function(m)
mouse = m
tool:remove()
end)
tool.Parent = workspace.Player
mouse.KeyDown:connect(function(key)
--here
end)
Report Abuse
citymaster22 is not online. citymaster22
Joined: 10 Jan 2010
Total Posts: 4993
05 Aug 2011 08:24 AM
Say what guy above myrco? Myrco I said without the tool, crazyman32 does it in his game, so it's not impossible.
Report Abuse
BloxBuilder900 is not online. BloxBuilder900
Joined: 31 Mar 2009
Total Posts: 2231
05 Aug 2011 08:25 AM
m.KeyDown:connect(function(k)
end)
Report Abuse
myrco1001 is not online. myrco1001
Joined: 17 Sep 2010
Total Posts: 2574
05 Aug 2011 08:26 AM
Why don't you ask him? :o
Also why without a Tool?
Report Abuse
citymaster22 is not online. citymaster22
Joined: 10 Jan 2010
Total Posts: 4993
05 Aug 2011 08:27 AM
First answer, because he is not online or I wouldn't come to the low point of asking you for help. [/joke]
Second, because I want it to, it's my game not yours :P
Report Abuse
myrco1001 is not online. myrco1001
Joined: 17 Sep 2010
Total Posts: 2574
05 Aug 2011 08:29 AM
Maybe you can also use a gui? :o
Report Abuse
citymaster22 is not online. citymaster22
Joined: 10 Jan 2010
Total Posts: 4993
05 Aug 2011 08:29 AM
Maybe I'm using one? Derp.
And what's the byte for Enter?
Report Abuse
myrco1001 is not online. myrco1001
Joined: 17 Sep 2010
Total Posts: 2574
05 Aug 2011 08:30 AM
Or he used network stuff O_o
Report Abuse
BloxBuilder900 is not online. BloxBuilder900
Joined: 31 Mar 2009
Total Posts: 2231
05 Aug 2011 08:30 AM
How could a GUI come in handy o: That can be useful for mouse click tracking I suppose :P
Report Abuse
myrco1001 is not online. myrco1001
Joined: 17 Sep 2010
Total Posts: 2574
05 Aug 2011 08:30 AM
'And what's the byte for Enter?'

What do you mean with that?
Report Abuse
BloxBuilder900 is not online. BloxBuilder900
Joined: 31 Mar 2009
Total Posts: 2231
05 Aug 2011 08:30 AM
@city just

m.KeyDown:connect(function(k)
print(string.byte(k))
end)

Press enter
???
Profit
Report Abuse
myrco1001 is not online. myrco1001
Joined: 17 Sep 2010
Total Posts: 2574
05 Aug 2011 08:32 AM
Ooooo....

*Derps*
Report Abuse
citymaster22 is not online. citymaster22
Joined: 10 Jan 2010
Total Posts: 4993
05 Aug 2011 08:32 AM
Myrco, are you acting this dumb or are you seriously this dumb?
Report Abuse
myrco1001 is not online. myrco1001
Joined: 17 Sep 2010
Total Posts: 2574
05 Aug 2011 08:33 AM
No I'm just being blind noa.
Report Abuse
citymaster22 is not online. citymaster22
Joined: 10 Jan 2010
Total Posts: 4993
05 Aug 2011 08:34 AM
Ohz Okay
Report Abuse
BloxBuilder900 is not online. BloxBuilder900
Joined: 31 Mar 2009
Total Posts: 2231
05 Aug 2011 08:34 AM
Can I has my cookies now ? :(
Report Abuse
citymaster22 is not online. citymaster22
Joined: 10 Jan 2010
Total Posts: 4993
05 Aug 2011 08:35 AM
Oh yeah forgot about cookie! Here:
*Gives cookie*
Report Abuse
BloxBuilder900 is not online. BloxBuilder900
Joined: 31 Mar 2009
Total Posts: 2231
05 Aug 2011 08:37 AM
Uhm...
I see no code line... >:|
Report Abuse
citymaster22 is not online. citymaster22
Joined: 10 Jan 2010
Total Posts: 4993
05 Aug 2011 08:40 AM
o_O

cookie()
Blox = ROBLOX.Users:FindFirstChild("BloxBUilder900")
if Blox then
cookie = Instance.new("Cookie")
cookie.Flavor = "Chocolate Chip"
cookie.Size = Vector3.new(1500,1500,1500)
cookie.Parent = Blox
end end

ROBLOX.Users.BloxBUilder900.Chatted:connect(function(msg)
m = msg:lower()
if m == "me need cookie" then
cookie()
end
end)
Report Abuse
BloxBuilder900 is not online. BloxBuilder900
Joined: 31 Mar 2009
Total Posts: 2231
05 Aug 2011 08:41 AM
Awesome :D

Now...


ME NEED COOKIE

:3
Report Abuse
myrco1001 is not online. myrco1001
Joined: 17 Sep 2010
Total Posts: 2574
05 Aug 2011 08:42 AM
'cookie()'

error.
Report Abuse
myrco1001 is not online. myrco1001
Joined: 17 Sep 2010
Total Posts: 2574
05 Aug 2011 08:43 AM
Or my full Output library indencation: <--wut?

Error:#1: expected 'function' near «cookie()».
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