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

How do I clone a player when they join?

Asked by 4 years ago

Now I have been trying to make a game similar to this game https://www.roblox.com/games/refer?PlaceId=3437931225&Position=1&PageType=Profile But I do not know how to clone a player when they join, can someone please help me make this game thanks! P.S. I have tried Alvinblox's video and it did not work.

2 answers

Log in to vote
0
Answered by
174gb 290 Moderation Voter
4 years ago
game.Players.PlayerAdded:connect(function(plr)
    plr.CharacterAdded:connect(function(chr)
    chr.Archivable = true --Make character "clonable"
    local clone = chr:clone() -- Clone Character
    clone.Parent = game.Workspace -- character parent    
    chr.Archivable = false --Make "unconable" again (optional)
  end)
end)

I hope this works

Ad
Log in to vote
0
Answered by
sheepposu 561 Moderation Voter
4 years ago
Edited 4 years ago

You can do this

game.Player.PlayerAdded:Connect(function(plr) --plr joins
    repeat wait() until plr.Character --wait for the plr's character to load in
    local ClonedCharacter = plr.Character:Clone() - Get a clone of the plr's character
end)

Answer this question