It's not like cloning the entire player but making an NPC wear hats and clothes just like the player (at the start, it will just be a naked blocky NPC, but when triggered by something, it will become a replica of the player)
Things like body colors and clothes is easy, but making the copying the accessories and positioning them is hard
01 | script.Parent.ClickDetector.MouseClick:Connect( function (plr) |
02 | if game:GetService( "ServerStorage" ).Players:FindFirstChild( tostring (plr)) = = nil then |
03 | plr.Character.Archivable = true |
04 | local plrf = game.Workspace [ tostring (plr) ] :Clone() |
05 | plrf.Parent = game.Workspace.p 1 |
06 | plrf.Torso.Anchored = true |
07 | plrf:SetPrimaryPartCFrame(CFrame.new(script.Parent.Parent.Head.Position)) |
08 | plrf.Name = "" |
09 | local PlrFold = Instance.new( "StringValue" ) |
10 | PlrFold.Name = plr.Name |
11 | PlrFold.Parent = game:GetService( "ServerStorage" ).Players |
12 | for index, child in pairs (script.Parent.Parent:GetChildren()) do |
13 | if child:IsA( "BasePart" ) then |
14 | child.Transparency = 1 |
15 | child.CanCollide = false |
16 | end |
17 | end |
18 | end |
19 | end ) |
I'd recommend just duplicating the player in Workspace
1 | local player = game.Workspace.JusticeOfScarlet:Clone() --My username as an example, copied into local variable |
2 |
3 | player.Parent = game.Workspace -- Sets the parent of clone to workspace |
4 | player.Name = "Clone" -- Sets name to "Clone" so it isn't confused with the actual player |
Just clone yourself man!
1 | game.Players.PlayerAdded:connect( function (plr) -- When player joins in |
2 | local mannequin = plr.Character:Clone() -- Clones the players avatar |
3 | mannequin.PrimaryPart.CFrame = CFrame.new( 0 , 0 , 0 ) -- Change the position you want the mannequin to be |
4 | end ) |
Btw I'm a 11yo helping whatever age you are. xD Also paste it in a script and put it in serverscriptservice or just the workspace