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: Creating a Double-Jump?

Previous Thread :: Next Thread 
Craftero is online. Craftero
Joined: 24 Jun 2011
Total Posts: 1451
30 Dec 2015 06:19 AM
Does anybody know how to go about creating a double-jump mechanic in a game?
I'm also hoping to animate the jump. How do I ensure the double-jump lasts long enough to play the animation?
(I was thinking of a animating the Player to twirl around as they double-jump)

Any help or advise would be greatly appreciated.
Thanks in advance.
Report Abuse
Craftero is online. Craftero
Joined: 24 Jun 2011
Total Posts: 1451
30 Dec 2015 06:37 AM
*(I was thinking of animating the Player to twirl around as they double-jump)

Does anybody know how to make a double-jump?
Report Abuse
rvox is not online. rvox
Joined: 18 Feb 2011
Total Posts: 5380
30 Dec 2015 06:39 AM
you can detect when they are already jumping and listen for another spacebar press

then add a bodyforce to the character

just cframe the torso to make it spin
Report Abuse
Craftero is online. Craftero
Joined: 24 Jun 2011
Total Posts: 1451
30 Dec 2015 06:42 AM
How do I use Bodyforce?
Should I use Instance.new(), or have the Bodyforce permanently in the Player's Character?
Report Abuse
IanSplodge is not online. IanSplodge
Joined: 13 Aug 2012
Total Posts: 2686
30 Dec 2015 07:00 AM
local UIS = game:GetService("UserInputService")
local Human = game.Players.LocalPlayer.Character:WaitForChild("Humanoid")
UIS.InputBegan:connect(function(key,GPE)
if not GPE and key.KeyCode == Enum.KeyCode.Space then
if not GPE and key.KeyCode == Enum.KeyCode.Space and Human.Jump == true then
-- Make them double jump here by adding BodyVelocity
end
end
end)

~IanSplodge, Walrus God of the Forums.
Report Abuse
Craftero is online. Craftero
Joined: 24 Jun 2011
Total Posts: 1451
30 Dec 2015 07:16 AM
@IanSplodge

Thanks for the suggestion.

Does this go into StarterPlayerScripts as a LocalScript, or does this code get inserted into StarterPlayerScripts -> ControlScript -> MasterControl?

There is also a lot of LocalScripts within MasterControl, named as follows: DPad; Gamepad; KeyboardMovement; Thumbpad; Thumbstick; TouchJump; VehicleController.

So, where does this code go?
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