.help me, im trying to clone character

im trying to make that cool effect where it copies all of the character body parts and leaves a trail
(can’t find example of it)

local run = game:GetService("RunService")

local character = script.Parent
character.Archivable = true

run.RenderStepped:Connect(function()
	local model = Instance.new("Model")
	model.Parent = workspace
	
	for _, part in pairs(character:GetChildren()) do
		if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" then
			local clone = part:Clone()
			clone.Anchored = true
			clone.CanCollide = false
			clone.CanTouch = false
			clone.CanQuery = false
			
			clone.Transparency = .5
			clone.CastShadow = false
			clone.Parent = model
		end
	end
end)

all of my failed efforts






2 Likes

you are trying to duplicate your exact character which makes the game confused on finding which one your actual character is.

my idea would be to just create separate parts, and make their exact size and position the same as your body parts. get it?

your idea works in theory, however I would like r15 and rthro to work

another idea is you can clone the parts inside your character then immediately take them out of your character so it doesn’t confuse the game, then make modifications (cancollide = false, anchored = true)

as for rthro parts, you’d need meshes

Tested in studio, the bug is actually a quirk I experienced a while ago, when you clone the individual parts the welds/Motor6Ds are still joined to the initial instance. Using :BreakJoints will actually do the trick.

local run = game:GetService("RunService")

local character = script.Parent
character.Archivable = true

while true do
	local model = Instance.new("Model")
	model.Parent = workspace

	for _, part in pairs(character:GetChildren()) do
		if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" then
			local clone = part:Clone()
			clone.Anchored = true
			clone.CanCollide = false
			clone.CanTouch = false
			clone.CanQuery = false

			clone.Transparency = .5
			clone.CastShadow = false
			clone.Parent = model
			clone:BreakJoints()
		end
	end
	task.wait(0.1)
end
3 Likes

yeah but uh it says that break joints is “Deprecated” whatever that means

Well that sucks, guess you can just delete the joints manually.

Guess its because break joints only works if a part is in workspace.

now adding the humanoid, the parts have collisions, I can’t find the no humanoid collision property under workspace

Give me a few minutes and I’ll try to make a script to do this

local character = script.Parent
character.Archivable = true

while wait(0.1) do
local model = Instance.new(“Model”)
model.Parent = workspace

for _, part in pairs(character:GetChildren()) do
	if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" then
                    local pfokder = instance.new(“folder”)
                    Pfokder.parent = workspace
		local clone = part:Clone()
		clone.Anchored = true
		clone.CanCollide = false
		clone.CanTouch = false
		clone.CanQuery = false

		clone.Transparency = .5
		clone.CastShadow = false
		clone.parent = pfokder
	end
end

end

Try this I haven’t tested it yet but maybe lol

have u tried my solution? i haven’t tested it myself but it could work.

sorry i was not been on dev forum in a while, but yeah i had in mind of doing that
however, i can’t add the humanoid back in otherwise the parts will have collisions again for some stupid reason

local run = game:GetService("RunService")

local character = script.Parent
character.Archivable = true

run.Heartbeat:Connect(function()
	local model = Instance.new("Model")
	model.Parent = workspace
	
	local humanoid = Instance.new("Humanoid")
	humanoid:SetStateEnabled(Enum.HumanoidStateType.Physics, true)
	humanoid:ChangeState(Enum.HumanoidStateType.Physics)
	humanoid.Parent = model

	for _, part in pairs(character:GetChildren()) do
		if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" then

			local clone = part:Clone()
			for _, joint in pairs(clone:GetChildren()) do
				if joint:IsA("Motor6D") then
					joint:Destroy()
				end
			end
			clone.Anchored = true
			clone.CanCollide = false

			clone.Transparency = .5
			clone.CastShadow = false
			clone.Parent = model
		end
	end
end)

You could try something with collision groups to avoid collisions but yeah humanoids be like that.

Why add a humanoid though?

so it doens’t look blocky and so it automatically puts clothing on the character
image

i dont think collision groups would work, the humanoid automatically turns on can collide every heartbeat