Making NPC jump over objects if its needed to

Im working on my own chsing npc system without using roblox pathfinding, i want npc to recognize when he can jump over obstacles on his path to its target.

i tried:

local Offset = (DummyHrp.Position + Vector3.new(0,-3,0))
local Results = workspace:Raycast(Offset, DummyHrp.CFrame.LookVector * 1.25, params)

if Results then
	if not Results.Instance.Parent:FindFirstChild("Humanoid") then
		local HeightDifference = math.abs(Offset.Y - DummyHum.WalkToPoint.Y)
		if not DummyHum.Jump and HeightDifference <= 7 and HeightDifference >= 2 then
			DummyHum.Jump = true
		end
	end
end

Raycasting from npcHrp and checked difference between raycastPos.Y and npcWalkToPoint.Y but its not working as i wanted to.