How to make a humanoid or npc jump?

  1. Basically the title trying to make the humanoid jump when something is in its way.

  2. Just not to sure on how it’s done.

  3. I looked up some stuff but can’t figure it out.

local walk = script.Parent:WaitForChild("Humanoid"):LoadAnimation(script.Parent:WaitForChild("walk"))
local jump = script.Parent:WaitForChild("Humanoid"):LoadAnimation(script.Parent:WaitForChild("jump"))


masterDB = true
script.Parent.Humanoid.Running:Connect(function(speed)
	if speed > 5 then
		if walk.IsPlaying == false then
			if masterDB == true then
				print("Walking")
				walk:Play(.25)
			end
		end
	else
		if masterDB == false then return end
		masterDB = false
		if walk.IsPlaying == true then
			walk:Stop(.25)
			wait(.25)
		end
		masterDB = true
	end
end)

The script above is for moving idk if it has anything to do with jumping but here you go. Thank you.

3 Likes
4 Likes