Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Character not cloning every 0.1 seconds?

Asked by 6 years ago

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

Log in to vote
0
Answered by
PlaasBoer 275 Moderation Voter
6 years ago

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.

0
still doesnt work SuperBeeperman 30 — 6y
0
What happens when you add this script? PlaasBoer 275 — 6y
Ad
Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

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

0
attemp to index hehe a nil value SuperBeeperman 30 — 6y
0
I added answer. PlaasBoer 275 — 6y

Answer this question