#Exclusive PathfindingModifiers

1 messages · Page 1 of 1 (latest)

final cove
#

Im wondering if its possible to make it so a pathfindingmodifier pass through is only detected by specific NPCs

#

For example, I have an scp173 model that has the ability to open doors

#

I need it to detect that the door is something it can walk through, but only scp173 should be able to detect this

#

No other NPC should try to walk through the door

#

as far as i know, pathfinding modifiers are global. Is there a way to make it it so it only applies to one NPC? or any alternatives

winter dove
#

Maybe you can do it with math.huge?

frank saddleBOT
#

studio** You are now Level 2! **studio

winter dove
#
local PathfindingService = game:GetService("PathfindingService")

local agentParams = {
    AgentRadius = 3,
    Costs = {
        ["not SCP"] = math.huge 
    }
}

local path = PathfindingService:CreatePath(agentParams)
#
local agentParams = {
    AgentRadius = 3,
    Costs = {
        ["SCP173Only"] = 1.0
    }
}

local path = PathfindingService:CreatePath(agentParams)
final cove
#

yeah math.huge worked :)