Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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)

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)

1 comment

0

I think you should probably be chaning Humanoid.JumpPower to 0/42 instead of StarterPlayer.CharacterJumpPower

1 answer

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

1 comment

0

its literally what i alr wrote in the script

This discussion is preserved as it was. New answers, comments, and votes are closed.