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 » Scripting Helpers
Home Search
 

Easy, accurate jump detection?

Previous Thread :: Next Thread 
Legostarwars98745 is not online. Legostarwars98745
Joined: 02 Jan 2008
Total Posts: 68659
25 Aug 2014 07:27 AM
ik you can use the Jumping event in Humanoid, but it fires multiple times per jump

I was wondering if there was a better way so that the event would only fire once per jump

heres the function if it helps

player.Character.Humanoid.Jumping:connect(function()
if debounce == false then
debounce = true
if stamina >25 then
repeat
if stamina - 3 >=0 then
stamina = stamina - 3
StaminaCheck()
wait(1)
end
until player.Character.Humanoid.Jump == false or stamina-3<0
RegenStamina()
end
wait(1)
debounce = false
end
end)
Report Abuse
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
25 Aug 2014 07:39 AM
just use Humanoid.Changed:connect(function(change)

if change == "Jump" then -- or whatever the property is called
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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