How to make the players jumppower lower or higher depending on his speed?
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)
01 | local Character = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait() |
03 | local Humanoid = Character:WaitForChild( "Humanoid" ) |
04 | local jump = game.StarterPlayer.CharacterJumpPower |
11 | Humanoid.Running:Connect( function (speed 2 ) |
12 | if speed 2 < lowspeed then jump = 0 |
13 | else if speed 2 > lowspeed and speed 2 < highspeed then jump = 39.643 |
14 | else if speed 2 > highspeed then jump = 42 |