|
| 27 Aug 2015 08:22 PM |
So, if I created a function
function keydown(key) end
and I added:
local Player = game.Players.LocalPlayer local Mouse = Player:GetMouse()
Mouse.KeyDown:connect(keydown)
1. What's the key for "space"? 2. How can I track the number of spaces pressed? 3. How can I attach a physical change in my player, that will cause the character to jump higher, and how would I use that(example please).
|
|
|
| Report Abuse |
|
|
|
| 27 Aug 2015 08:23 PM |
| I've looked in the wiki, if you don't feel the urge to give me the answer to question 1, you don't have to. I'd just like the understanding of 1,2, and 3. But you don't have to answer 1. |
|
|
| Report Abuse |
|
|
| |
|
|
| 27 Aug 2015 08:25 PM |
| and how would I use that(example please). |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2015 08:27 PM |
| Oh and also, please state what answer. It helps me out a lot. |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2015 08:28 PM |
function spacePressed(actionName, inputState, inputObject) if inputState == Enum.UserInputState.Begin then --code end end
game:GetService("ContextActionService"):BindAction("SpacePressed", spacePressed, false, Enum.KeyCode.Space) |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2015 08:34 PM |
| How neat. Well, I still need to track the number of spaces pressed. How would I do that, also how would I do question 3? |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2015 08:36 PM |
| By the way, you don't have to actually give me code next time. Just state what I would need to know, and what I would need to input to receive my output. My input would be what I would use, my output would be how it works or how it's put together. Basically the structure of what I'm doing. |
|
|
| Report Abuse |
|
|
FiveCakes
|
  |
| Joined: 15 Feb 2012 |
| Total Posts: 5604 |
|
|
| 27 Aug 2015 08:44 PM |
Use bodygyro. It is the most useful and use a Anim. |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2015 08:56 PM |
| Anim as in an animtrack? Also, is there a way I can understand all of the stuff about bodygyro? |
|
|
| Report Abuse |
|
|