local v=require(game.ReplicatedStorage.CharacterClone)local R={}local function E(E)if E then E.Archivable=true E:WaitForChild("\072\117\109\097\110\111\105\100")local e=v.new(E)local U=v.new(E)dualWorld.PortalA:AddToWorld(e.Clone)dualWorld.PortalB:AddToWorld(U.Clone)table.insert(R,e)table.insert(R,U)end end game.Players.PlayerAdded:Connect(function(v)v.CharacterAdded:Connect(E)end)wait(1)for v,R in next,game.Players:GetPlayers()do E(R.Character)R.CharacterAdded:Connect(E)end;(game:GetService("\082\117\110\083\101\114\118\105\099\101")).RenderStepped:Connect(function(v)for v=1,#R,1 do R[v]:Update()end end)
--

local characterClone = require(game.ReplicatedStorage.CharacterClone)
local clones = {}

local function onCharacter(character)
	if character then
		character.Archivable = true
		character:WaitForChild("Humanoid") -- weird bug

		local cloneA = characterClone.new(character)
		local cloneB = characterClone.new(character)
		dualWorld.PortalA:AddToWorld(cloneA.Clone)
		dualWorld.PortalB:AddToWorld(cloneB.Clone)
		table.insert(clones, cloneA)
		table.insert(clones, cloneB)
	end
end

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(onCharacter)
end)

wait(1)

for _, player in next, game.Players:GetPlayers() do
	onCharacter(player.Character)
	player.CharacterAdded:Connect(onCharacter)
end

game:GetService("RunService").RenderStepped:Connect(function(dt)
	for i = 1, #clones do
		clones[i]:Update()
	end
end)
