Pathfinding modifier not working : /

I want my npc to go around a part using path finding modifiers, but it isn’t working. Can someone please help thanks

local Modifer = Instance.new("PathfindingModifier", workspace.BlockPart)

Modifer.ModifierId = "KillPart"
local Costs= {
	AgentRadius = 2,
	AgentCanJump = false,
	KillPart = math.huge
	
}
local NPC = script.Parent
NPC.PrimaryPart:SetNetworkOwner(nil)
local human = NPC.Humanoid
local path =  pathfindingservice:CreatePath(Costs)
path:ComputeAsync(NPC.HumanoidRootPart.Position, game.Workspace.EndPart.Position)

if path.Status == Enum.PathStatus.Success then
	local nodes = path:GetWaypoints()
	for i,v in pairs(nodes) do
		
		if v.Action == Enum.PathWaypointAction.Jump then
			human.Jump = true
		end
		human:MoveTo(v.Position)
		human.MoveToFinished:Wait()
	end

end

Hi, try replacing the costs with this.

local agentParameters = {
    AgentRadius = 2,
    AgentCanJump = false,
    Costs = {
        KillPart = math.huge
    }
}

I was able to fix it by enabling pathfinding modifiers in the beta tab.