|
| 29 Nov 2012 02:56 PM |
How would I make this (Not for a hopperbin btw, If it matters)
(This is my failure, I have almost no idea what to do)
if KeyDown == "r" then print("NubCaik") elseif KeyDown == "p" then print("Double nub caik") end |
|
|
| Report Abuse |
|
|
Monkey727
|
  |
| Joined: 12 Jan 2009 |
| Total Posts: 969 |
|
|
| 29 Nov 2012 03:01 PM |
script.Parent.Equipped:connect(function(mouse) mouse.KeyDown(function(key)
if key == "r" then print("NubCaik") elseif key == "p" then print("Double nub caik") end
end) end)
I think |
|
|
| Report Abuse |
|
|
Monkey727
|
  |
| Joined: 12 Jan 2009 |
| Total Posts: 969 |
|
|
| 29 Nov 2012 03:01 PM |
| Oops, :connect after that KeyDown :P |
|
|
| Report Abuse |
|
|
zoomypie2
|
  |
| Joined: 25 Oct 2011 |
| Total Posts: 8050 |
|
|
| 29 Nov 2012 03:07 PM |
Wrong, sorry :P
function onKeyDown(key) key:lower() if key == "r"
:D |
|
|
| Report Abuse |
|
|
Monkey727
|
  |
| Joined: 12 Jan 2009 |
| Total Posts: 969 |
|
|
| 29 Nov 2012 03:09 PM |
You mean key = key:lower()
And it would still work.. That just means it ignores capitals. |
|
|
| Report Abuse |
|
|
|
| 29 Nov 2012 03:33 PM |
@zoomy I need to advise you again, leave.
- thedestroyer115 |
|
|
| Report Abuse |
|
|
|
| 29 Nov 2012 05:33 PM |
script.Parent.Equipped:connect(function(mouse) mouse.KeyDown:connect(function(key)
if key == "r" then print("NubCaik") elseif key == "p" then print("Double nub caik") end
end) end)
Like this?
(Sorry for late reply, Was busy) |
|
|
| Report Abuse |
|
|
|
| 29 Nov 2012 06:25 PM |
That'd work. Make sure it is in a localscript though.
- thedestroyer115 |
|
|
| Report Abuse |
|
|
|
| 29 Nov 2012 06:30 PM |
Its not a local script and works?
Is there a reason to change it? |
|
|
| Report Abuse |
|
|
|
| 29 Nov 2012 06:32 PM |
Are you doing Tools/Test/Play Solo ?? It will work there, because that is all client. If you test it in regular servers it will break. Test it for yourself.
Change it to LocalScript.
- thedestroyer115 |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 29 Nov 2012 06:41 PM |
Btw, you seem like an alright person. I wouldn't mind you sending me a friend request. I would gladly accept.
- thedestroyer115 |
|
|
| Report Abuse |
|
|
|
| 29 Nov 2012 06:46 PM |
if Accept ~= nil then site.More.People.thedestroyer115.Friends.Add = Add.new("CaptainSandbox") end
:3 |
|
|
| Report Abuse |
|
|