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 6 years ago
Edited 6 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 — 6y
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 — 6y
0
Just clone yourself PenguinDevs 45 — 6y

3 answers

Log in to vote
0
Answered by
Meqolo 78
6 years ago
script.Parent.ClickDetector.MouseClick:Connect(function(plr)
    if game:GetService("ServerStorage").Players:FindFirstChild(tostring(plr)) == nil then   
        plr.Character.Archivable = true
        local plrf = game.Workspace[tostring(plr)]:Clone()  
        plrf.Parent = game.Workspace.p1
        plrf.Torso.Anchored = true
        plrf:SetPrimaryPartCFrame(CFrame.new(script.Parent.Parent.Head.Position))
        plrf.Name = ""
        local PlrFold = Instance.new("StringValue")
        PlrFold.Name = plr.Name
        PlrFold.Parent = game:GetService("ServerStorage").Players
        for index, child in pairs(script.Parent.Parent:GetChildren()) do
            if child:IsA("BasePart") then
                child.Transparency = 1
                child.CanCollide = false
            end
        end
        end
end)
Ad
Log in to vote
0
Answered by 6 years ago

I'd recommend just duplicating the player in Workspace

local player = game.Workspace.JusticeOfScarlet:Clone() --My username as an example, copied into local variable

player.Parent = game.Workspace -- Sets the parent of clone to workspace
player.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 — 6y
Log in to vote
0
Answered by 6 years ago

Just clone yourself man!

game.Players.PlayerAdded:connect(function(plr) -- When player joins in
    local mannequin = plr.Character:Clone() -- Clones the players avatar
    mannequin.PrimaryPart.CFrame = CFrame.new(0, 0, 0) -- Change the position you want the mannequin to be
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

0
Never tested this though. xDDDD PenguinDevs 45 — 6y
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 — 6y

Answer this question