#How can I disable jumping when ur crouching?

1 messages · Page 1 of 1 (latest)

grave karma
#

Hey, I'm really new at scripting and I wanted to make a movement system. Now I can walk, run and crouch, but I want to disable jumping when crouch, and I cant find any way to do this, can anyone help?

Thats my script, I'll be honest, I asked for help to someone who knows more than me at scripting and I asked to the roblox AI assistant to explain me the code. I want to learn about functions and all that stuff while seeing the code itself and how it works.
I think this is important, sooo... In the game will be races (like: human, dragon, hydra, and will affect the speed, jump power, etc.) So I have to be able to give each player a different jump power and stuff like that, if that matters in the code.

ah, I honestly dont know what tag use in this post...

Thanks!

cyan quartz
#

set humanoid.JumpHeight to 0 while crouching then reset back to normal after crouching humanoid.JumpHeight = 50

errant mist
#

Isnt 50 for JumpPower?

vivid tiger
#

yeah JumpHeight is 7.2 I think

#

you can disable/enable any Humanoid state you want