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

How to make the players jumppower lower or higher depending on his speed?

Asked by 2 years ago

What im trying to make is a script that disables jumping when your character is walking slow (<13) and jump high when your character is running (>13)

01local Character = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()
02 
03local Humanoid = Character:WaitForChild("Humanoid")
04local jump = game.StarterPlayer.CharacterJumpPower
05 
06jump = 1
07 
08local lowspeed = 13
09local highspeed = 20
10 
11Humanoid.Running:Connect(function(speed2)
12    if speed2 < lowspeed then jump = 0
13    else if speed2 > lowspeed and speed2 < highspeed then jump = 39.643
14        else if speed2 > highspeed then jump = 42
15 
16            end
17        end
18 
19    end
20end)
0
I think you should probably be chaning Humanoid.JumpPower to 0/42 instead of StarterPlayer.CharacterJumpPower cmgtotalyawesome 1418 — 2y

1 answer

Log in to vote
0
Answered by 2 years ago

Make it so if their walkspeed is less than something than their jumppower increases. Hope tha thelps!

0
its literally what i alr wrote in the script 123marooxd123 13 — 2y
Ad

Answer this question