So I am working on anime arena style game and I came across a glitch that I don’t know why is happening. I want to create 2 clones of a player but for some reason it creates 3. Here is the script that makes the clones.
Character.Archivable = true
for i = 1,2 do
if i == 1 then
local FirstClone = Character:Clone()
FirstClone.Parent = Character
FirstClone.HumanoidRootPart.CFrame = Character.HumanoidRootPart.CFrame * CFrame.new(2,0,-3) * CFrame.Angles(0,-80,0)
else
local SecondClone = Character:Clone()
SecondClone.Parent = Character
SecondClone.HumanoidRootPart.CFrame = Character.HumanoidRootPart.CFrame * CFrame.new(-2,0,-3) * CFrame.Angles(0,80,0)
end
end```
Any idea why it is doing this?