Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How can I make a player clone spawn properly?

I have a clone player script which clones the player, but the clone doesn't have a shirt or pants or any accessories. How would I fix this? Here is my script:

game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		char.Archivable = true
		local d = char:Clone()
		d.Parent = game.Workspace
		
		d.UpperTorso.CFrame = CFrame.new(0,50,0)
		
	end)
end)

1 answer

✓ Accepted answer

Your character was loading in too quickly meaning that the clone would spawn before any of the textures had been fully loaded.

game.Players.PlayerAdded:Connect(function(plr)
    plr.CharacterAdded:Connect(function(char)
	char:WaitForChild("Shirt" and "Pants")
        char.Archivable = true
        local d = char:Clone()
        d.Parent = game.Workspace

        d.UpperTorso.CFrame = CFrame.new(0,50,0)

    end)
end)

If this helped, don't forget to give it an Up vote!

2 comments

0

Thank you!

0

You're welcome! :)

This discussion is preserved as it was. New answers, comments, and votes are closed.