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

How do i clone a person to an npc?

Asked by
VitroxVox 884 Moderation Voter
4 years ago
Edited 4 years ago

So i don't really have a problem with the cloning cause it actually works and all the npc gets my skin color, package, hats, shirt, pants but the problem is the hat's disappear like there's not on the ncp's head their inside the npc and everything is there the handle and everything but it still doesn't show up, anyone? , anything?, maybe the welding?

script:

wait(1 + math.random())

local npc = workspace.Character.Dummy
local player = workspace[game.Players.LocalPlayer.Name]

for _,stuff in pairs(player:GetChildren()) do
    if stuff:IsA("Shirt") or stuff:IsA("ShirtGraphic") or stuff:IsA("Accessory") or stuff:IsA("BodyColors") or stuff:IsA("Pants") then
        stuff:Clone().Parent = npc
    end 
end

player.Head.face:Clone().Parent = npc.Head

wait(1)

script:Destroy()

Don't hate on me cause it's local , it doesn't matter why it's a localscript.

TO BE CLEAR I WANT THIS TO CLONE TO AN NPC NOT MAKE AN NPC OUT OF MY CHARACTER CAUSE I WOULDN'T ASK IF I WANTED TO DO THAT!

0
workspace.RBLXNogin:Clone() will clone RBLXNogin fully... this is how you accomplish this RBLXNogin 187 — 4y
0
Bruh i said i need to copy it to an NPC not make an npc out of it, if i wanted that i wouldn've not asked. VitroxVox 884 — 4y

1 answer

Log in to vote
1
Answered by
Elixcore 1337 Moderation Voter
4 years ago
Edited 4 years ago

Hey this is a really old script that I remember I had made a while ago.

I did the exact same thing, localscript that would copy your own appearance to a dummy.

It functions similarly to what I think you need, sorry if it's messy and such, it's old.

local npc = workspace.intro[plr.Name]

    for i,v in next, plr.Character:GetChildren() do
        if v:IsA("Pants") or v:IsA("Shirt") or v:IsA("BodyColors") then
            l = v:Clone()
            l.Parent = npc
        end
        if v:IsA("Accessory") then
            if v:FindFirstChild("Handle") then
                o = v:Clone()
                o.Parent = npc
                o.Handle.CanCollide = false
                o.Handle:FindFirstChildOfClass("Weld").Part0 = o.Handle
                o.Handle:FindFirstChildOfClass("Weld").Part1 = npc.Head
            end
        end
    end
0
Thank you <3 VitroxVox 884 — 4y
Ad

Answer this question