Burglered
|
  |
| Joined: 14 Jul 2011 |
| Total Posts: 962 |
|
|
| 18 Oct 2015 07:34 PM |
| I haven't coded on roblox in a while and I forgot how to do key down stuff. |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2015 07:37 PM |
1. http://wiki.roblox.com/?title=API:Class/UserInputService 2. http://wiki.roblox.com/index.php?title=API:Class/UserInputService/InputBegan
Or you could use Mouse.KeyDown which is what you're probably used to.
-The [Guy] |
|
|
| Report Abuse |
|
|
Burglered
|
  |
| Joined: 14 Jul 2011 |
| Total Posts: 962 |
|
|
| 18 Oct 2015 07:44 PM |
| Could I use key:lower or something |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2015 07:45 PM |
| please explain how you are supposed to get the lowercase version of spacebar |
|
|
| Report Abuse |
|
|
Burglered
|
  |
| Joined: 14 Jul 2011 |
| Total Posts: 962 |
|
| |
|
Burglered
|
  |
| Joined: 14 Jul 2011 |
| Total Posts: 962 |
|
|
| 18 Oct 2015 07:46 PM |
| Im talking about if the space is pressed(lowered, dropped, pressed, smashed) |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2015 07:47 PM |
| that's not what :lower() does lol |
|
|
| Report Abuse |
|
|
Burglered
|
  |
| Joined: 14 Jul 2011 |
| Total Posts: 962 |
|
|
| 18 Oct 2015 07:49 PM |
Plz hlp cri. When space is pressed I want to set 'off' to 'true'
local off = true local rotate = script.Parent.Rotation db = true
if off == false and db == true then db=false wait(.2) for i=90,310,10 do rotate = i end for a=315,145,-10 do rotate = a end end |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2015 07:50 PM |
| the one guy gave you all the resources you need, you should be able to implement it yourself |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2015 07:53 PM |
:lower() is for strings, lol. Anyways. local UserInputService = game:GetService("UserInputService");
UserInputService.InputBegan:connect(function(input, process) if input.UserInputType == Enum.UserInputType.Keyboard then if input.KeyCode == Enum.Space.KeyCode then print("Space pressed."); off = true; end end end) |
|
|
| Report Abuse |
|
|
Burglered
|
  |
| Joined: 14 Jul 2011 |
| Total Posts: 962 |
|
|
| 18 Oct 2015 08:00 PM |
| omg thank you. Im not that good a scripting so I can't really do it my self. |
|
|
| Report Abuse |
|
|
Burglered
|
  |
| Joined: 14 Jul 2011 |
| Total Posts: 962 |
|
|
| 18 Oct 2015 08:02 PM |
| Btw, It says Space is noot a valid EnumItem |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2015 08:05 PM |
| Oops. Should be Enum.KeyCode.Space |
|
|
| Report Abuse |
|
|