Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I prevent infinite jump?

Asked by
trecept 367 Moderation Voter
6 years ago

I'm making a game where quite a lot of jumping is needed, but infinite jump ruins the experience for others. I don't know how to stop infinite jumping without making jumping weird for other players. Any way to prevent?

0
How do players “infinite jump” exactly? Are you using some custom jump script or something? Do you mean you don’t want them jumping every second? User#20279 0 — 6y
0
What exactly do you mean by preventing infinite jump? UgOsMiLy 1074 — 6y
0
What do you mean by infinite jump? Aimarekin 345 — 6y
0
I think he means that he needs a wait for each jump, TheLightningRises 56 — 6y
0
Sorry I explained poorly, basically how can I make a script so that when a player jumps, it waits for the jump to finish (you touch the ground again) before allowing you to jump again trecept 367 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

You could use HumanoidStateType and change the humanoid’s JumpPower to 0 when someone jumps. You can then change the JumpPower back to normal when the player lands.

I’d give an example script but I never used HumanoidStateType and I’m on mobile. Hope this helped anyways though!

0
Definitely helped! Thank you so much, I know what to do now. trecept 367 — 6y
Ad

Answer this question