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

Character not cloning every 0.1 seconds?

oh and btw if you could make the clone a local value that would be awesome

game.Players.PlayerAdded:Connect(function(Player)
    Player.CharacterAdded:Connect(function(Character)
	while wait(0.1) do
		Character:Clone()
	end
end)
end)

2 answers

✓ Accepted answer

Clone works if the model Archivable property is true and by default player character isn't so you must add the code.

The code here is tested in studio non FE enviroment.

game.Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(Character)
		Character.Archivable = true
		local clonedCharacter = Character:Clone()
	    while wait(0.1) do
			clonedCharacter.Parent = game.Workspace
		end
	end)
end)

That will clone the player character.

2 comments

0

still doesnt work

0

What happens when you add this script?

this script... it's pretty outdated.

First, you don't need 2 functions. Here is the fixed codeL

workspace.ChildAdded:connect(function(obj)
	if obj:FindFirstAncestor("Humanoid") then
		for i = 0, 100, 1 do -- set the middle number to how many times you want this to run
			local a = obj:Clone()
				a.Parent = workspace
		end
	end
end)

the clone's parent wasn't the workspace, so it wasn't appearing.

If you want to just use your code, then do:

game.Players.PlayerAdded:Connect(function(Player)
    Player.CharacterAdded:Connect(function(Character)
    while wait(0.1) do
	local hehe = Character:Clone()
	hehe.Parent = workspace
     end
end)
end)

If this helped, please accept answer. :D

2 comments

0

attemp to index hehe a nil value

0

I added answer.

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