Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

How to clone character, locally?

Asked by 2 months 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 2 months ago
Edited 2 months 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 149 — 2mo
0
dumb idiot SilentsReplacement 453 — 2mo
0
??? THUNDER_WOW 149 — 2mo
0
Where are you running your code? YTRaulByte 374 — 2mo
Ad
Log in to vote
0
Answered by 2 months 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 149 — 2mo

Answer this question