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)

local Character = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()

local Humanoid = Character:WaitForChild("Humanoid") 
local jump = game.StarterPlayer.CharacterJumpPower 

jump = 1

local lowspeed = 13
local highspeed = 20

Humanoid.Running:Connect(function(speed2)
    if speed2 < lowspeed then jump = 0
    else if speed2 > lowspeed and speed2 < highspeed then jump = 39.643
        else if speed2 > highspeed then jump = 42

            end
        end

    end
end)
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