Make dummy uncollideable

hi i made a script which creates/clones 10 dummys and they do some stuffs that i wrote.
the problem is, they collide on eachother, ive already set all their bodyparts to uncollideable but they still get collide. i did some reseach about that and ended up with collisions filtering, and i dont know how to use it for this type of stuffs.

heres the script if needed ?

local players = game:GetService("Players")
local runService = game:GetService("RunService")
local pathfindingService = game:GetService("PathfindingService")
local serverStorage = game:GetService("ServerStorage")
local physicsService = game:GetService("PhysicsService")

local dummy = serverStorage.Dummy:Clone()
local dummyHumanoid = dummy.Humanoid
local dummyHRP = dummy.HumanoidRootPart
local player= script.Parent
local playerHRP = player.HumanoidRootPart
local followPart = workspace:WaitForChild("followPart", 5)

local tpDebounce = false

for i = 1, 10 do --line where creates/clones dummys
	local clonedDummy = serverStorage.Dummy:Clone()
	local clonedDummyHRP = clonedDummy.HumanoidRootPart
	clonedDummy.Parent = workspace
	clonedDummyHRP.CFrame = playerHRP.CFrame * CFrame.new(0,-5,0)
end

for i, v in pairs(workspace:GetChildren("Dummy")) do
	if v.Name == "Dummy" then
		local function followPartFunction()
			local path = pathfindingService:CreatePath()
			local movingToPos = followPart.Position
			local computedPath = path:ComputeAsync(v.HumanoidRootPart.Position, movingToPos)
			return path
		end

		if workspace:WaitForChild("followPart") then
			runService.Stepped:Connect(function()
				followPartFunction()
				local path = followPartFunction()
				for _, waypoint in pairs(path:GetWaypoints()) do
					v.Humanoid:MoveTo(waypoint.Position)
				end
			end)
		end
	end
end

There’s a baked in process to Humanoids that enables their collisions every frame (and later, only on state changes). Humanoids require collisions on certain limbs to be enabled because of internal raycasts that keep the character above surfaces.

You should take a look at Collision Filtering if you don’t want your NPCs to collide with each other or even players. This will allow you to disable collisions between Humanoid entities while still keeping their collisions enabled so they don’t fall through the floor or act unexpectedly.

1 Like