Cloning the player 10 times, then putting it a bit back each time

I’m trying to make a for loop that clones the player 10 times and puts it behind the player, but it simply just isn’t it working, and clones it only once.

         for i = 1, 10 do wait(0.2)
            target.Archivable = true
            local YOOOITSME = target:Clone()
            YOOOITSME.Parent = game.Workspace
            YOOOITSME.CFrame = target.HumanoidRootPart.CFrame * CFrame.new(0,0,back)
            back = back + 2

target.Archivable = true, probably this line, since if something is Archivable, it can’t be cloned, may try removing it and seeing what happens?

Archivable

That’s not the issue, it clones, but it just keeps sliding

What do you mean by it keeps sliding? Maybe try anchoring it

YOOOITSME.HumanoidRootPart.Anchored = true

@EmbatTheHybrid it’s the other way around, when something isn’t archivable it can’t be cloned, and iirc your character isn’t archivable by default, which is why he does that.

Oh! Thank you for correcting me on that one, got a bit confused about that, sorry for the misinformation!

And for @OP, I’m not sure what it could be, maybe set the CFrame first and then Parent it to workspace? Are you getting errors or anything?

2 Likes

That fixed the sliding issue, but it still only clones once.
image

Here’s what I get


Line 64 is

			YOOOITSME.CFrame = YOOOITSME.HumanoidRootPart.CFrame * CFrame.new(0,0,back)

Oh I see, you’re trying to set a CFrame of a model, that doesn’t work, you have to use something else to move it, perhaps

YOOOITSME:SetPrimaryPartCFrame(YOOOITSME.HumanoidRootPart.CFrame * CFrame.new(0,0,back))

After posting that, I just realized my issue. I forgot I had to set the PrimaryPart’s CFrame, i’ll test it and see how it goes.

1 Like

When something is Archivable, it can be cloned.

By default, the character’s Archivable is set to false, so his lines of script made it true.

image

What I see is that you tried setting the CFrame of the character instead of the HumanoidRootPart.

1 Like

Exactly what I realized, I’m trying to set the CFrame of the RootPart now, and I’ll update on how it goes.

I appreciate the help, everyone! It now works, and thanks to you guys. I appreciate you all. Have a good one!

1 Like

Anytime! If you have anymore issues don’t be afraid to make another post!

1 Like