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

How to clone character, locally?

Asked by 4 years ago

How do I make it so when a player joined their character gets cloned, locally? I know I have to use a local script but how do I actually clone the player?

2 answers

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

To make it very simplified, set the Character.Archivable property to true. Attempting to clone an object that is not archivable will return nil

Barebones Example:

game.Players.LocalPlayer.Character.Archivable = true

local cloneCharacter = game.Players.LocalPlayer.Character:Clone()
cloneCharacter.Parent = workspace
0
This isnt working. THUNDER_WOW 203 — 4y
0
dumb idiot SilentsReplacement 468 — 4y
0
??? THUNDER_WOW 203 — 4y
0
Where are you running your code? YTRaulByte 389 — 4y
Ad
Log in to vote
0
Answered by 4 years ago

ok friend very easy to do. first know that character.archivable proeprty must be true as it umm determines wether it can be cloned or not.

the script:

local Player = game.Players.LocalPlayer

local Char = Player.Character or Player.CharacterAdded:Wait() -- if umm character not exist then it will wait for it to exist meaning the script wont run until character is there

Char:Clone()
Char.Parent = workspace 

bye

0
Your wait function will wait infinitely and it does not work cause my character isnt cloned and I cant find it in the workspace. Next time dont call others dumb if you cant help either. THUNDER_WOW 203 — 4y

Answer this question