Cloned pathfinding completely ignores collision group

So basically my npc gets cloned with a simple loop it has pathfinder script inside of it and when it spawns it should walk to the checkpoint which it does but then I throw in obstacles that its supposed to get obstructed by but doesn’t, I have set custom collision groups for npcs AAnd the npc obstacles and yet it completely ignores that EVEN the default gets ignored and the npc just walks through the wall even if the said wall should not be passable.

cloning script

local dummy = game.ServerStorage:FindFirstChild("Dummy")
--local pf = game.Workspace:FindFirstChild("pathfinder")
local point = script.Parent
local hasspawned = false




while true do	
	wait(1)
	if hasspawned == false then

		hasspawned = true
		npc = dummy:Clone()
		npc.Parent = game.Workspace
		nhrp = npc:FindFirstChild("HumanoidRootPart")
		nhrp.CFrame = CFrame.new(point.Position)
		for i, v in pairs(npc:GetChildren()) do
			if v:IsA("BasePart") then
				v:SetNetworkOwner(nil)
			end
		end
		wait(1)
		npc.pathfinder.CanMove.Value = true
		
		--ai = pf:Clone()
		--ai.Parent = npc
		--ai.Disabled = false

	end
	
end

and for the pathfinder well I didn’t stray too far away from the one in Roblox docs. Worst part is that it works when I test it with run testing and yet when I press play testing something messes up and the npc becomes a ghost that just walks a path ignoring all collidables.

Help would be appreciated!

There doesn’t look to be too much wrong with that. Can you show us the PathFinding part of the script.

its basically the same as the one in here Pathfinding (roblox.com)

This is how it runs when i press “RUN” instead of play and which is how its supposed to run!
nTy8JHlYQI

and then when i press play test it runs like this
96ASzrTHPL

here is my collision groups set up
image

This is because you’re playing on the client and any client changes won’t replicate to the server. Run is actually on the server so it works.

2 Likes

Well thats hella inconvenient… is there a way to make normal play test into serverish ? why did roblox leave play testing client sided…

Also big thanks for being the only one to actually help me here hahah even if the problem seems to be dummy like

1 Like

There’s a button that makes you go onto the server view.

1 Like

If you are talking about the client server testing then thats very inconvenient anyway thanks again