Making cloned character uncollidable

Hi, this is my first time posting here :smiley:

  1. What do you want to achieve? Keep it simple and clear!
    I want to make a cloned character unable to collide with players.

  2. What is the issue? Include screenshots / videos if possible!
    Cloned character is collidable.

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    i. I tried using collision group, made a new group and disabled everything but that makes the cloned character fall to the void. Anchoring the rootpart prevents it from falling but that makes the character collidable.

ii. Tried making baseparts cancollide property to false. Not working

local char = plr.Character
local root = char:FindFirstChild("HumanoidRootPart")
local humanoid = char:FindFirstChild("Humanoid")
	
char.Archivable = true

local clone = char:Clone()
local cloneHum = clone:WaitForChild("Humanoid")
local cloneRoot = clone:WaitForChild("HumanoidRootPart")

clone.Name = ""
clone.Parent = workspace.FX
clone.HumanoidRootPart.CFrame = game.Workspace["Anim Dummy"].HumanoidRootPart.CFrame * CFrame.new(0,0,-7) * CFrame.Angles(math.rad(180),0,math.rad(180))
clone.Humanoid.DisplayName = ""
cloneRoot.Anchored = true

for i,v in pairs(clone:GetChildren()) do
	if v:IsA("Part") or v:IsA("MeshPart") or v:IsA("BasePart") then 
		v.CollisionGroup = "clone" 
		v.CanCollide = false 
	end
end

game.Debris:AddItem(clone, 1.5)

Please do not ask people to write entire scripts or design entire systems for you. If you canโ€™t answer the three questions above, you should probably pick a different category.

I think you will need to use physics service and set the collidable of that collision group to false.

try this

local physic = game:GetService("PhysicsService")

physic:CollisionGroupSetCollidable("clone", "clone", false)
1 Like

To use collision groups for this, you need two collision groups: one for characters and a separate one for clones.

Then set it so the characters collide with default but not clones, and set the clones to collide with default but not players.

This way both the clones and characters collide with default (e.g. the ground) and they collide with themselves (e.g. characters can run into on other characters) but they donโ€™t collide with each other.

Thank you, this worked for me.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.