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: Double jumping

Previous Thread :: Next Thread 
Bobafettisawesome29 is not online. Bobafettisawesome29
Joined: 11 Aug 2015
Total Posts: 126
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
Bobafettisawesome29 is not online. Bobafettisawesome29
Joined: 11 Aug 2015
Total Posts: 126
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
foreverpower is not online. foreverpower
Joined: 05 Feb 2011
Total Posts: 5578
27 Aug 2015 08:24 PM
use contextactionservice
Report Abuse
Bobafettisawesome29 is not online. Bobafettisawesome29
Joined: 11 Aug 2015
Total Posts: 126
27 Aug 2015 08:25 PM
and how would I use that(example please).
Report Abuse
Bobafettisawesome29 is not online. Bobafettisawesome29
Joined: 11 Aug 2015
Total Posts: 126
27 Aug 2015 08:27 PM
Oh and also, please state what answer. It helps me out a lot.
Report Abuse
foreverpower is not online. foreverpower
Joined: 05 Feb 2011
Total Posts: 5578
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
Bobafettisawesome29 is not online. Bobafettisawesome29
Joined: 11 Aug 2015
Total Posts: 126
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
Bobafettisawesome29 is not online. Bobafettisawesome29
Joined: 11 Aug 2015
Total Posts: 126
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 is not online. 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
Bobafettisawesome29 is not online. Bobafettisawesome29
Joined: 11 Aug 2015
Total Posts: 126
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
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