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

How do you make a 'mannequin' of yourself with scripts?

Asked by 7 years ago
Edited 7 years ago

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

0
Have you tried coding this any bit urself? if so please include ur code + errors / dunno's :) DanielDeJong3 158 — 7y
0
the main thing i want to ask about this is how do you position the hat so it looks exactly the same like the player? Konethorix 197 — 7y
0
Just clone yourself PenguinDevs 45 — 7y

3 answers

Log in to vote
0
Answered by
Meqolo 78
7 years ago
01script.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.p1
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
19end)
Ad
Log in to vote
0
Answered by 7 years ago

I'd recommend just duplicating the player in Workspace

1local player = game.Workspace.JusticeOfScarlet:Clone() --My username as an example, copied into local variable
2 
3player.Parent = game.Workspace -- Sets the parent of clone to workspace
4player.Name = "Clone" -- Sets name to "Clone" so it isn't confused with the actual player
0
That doesn't work as the character is locked and unarchiveable, however I've made working code to fix it Meqolo 78 — 7y
Log in to vote
0
Answered by 7 years ago

Just clone yourself man!

1game.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
4end)

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

0
Never tested this though. xDDDD PenguinDevs 45 — 7y
0
This wouldn't work as the character isn't archiveable and is also locked, I have however made code to get around it if you look up. Meqolo 78 — 7y

Answer this question