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

How would I morph an NPC to look like a player?

Asked by
uhSaxlra 181
5 years ago

I'm trying to make a live NPC turn into a player's character. The NPC has a script inside that animates it and moves it. I want the NPC to still move around, but change it's appearance every now and then. How would I go about doing this?

wait(10)
for i,v in pairs(workspace.NPC:GetChildren()) do
    v:Destroy()
end
workspace.uhSaxlra:Clone().Parent = workspace.NPC --Basic thing I probably won't use later

This script clones my character but the npc won't run anymore and falls apart.

0
Try making the character.Archivable to true, it's set to false on default which means when you clone the character, the character becomes nil Jack_Hase 85 — 5y

1 answer

Log in to vote
1
Answered by 5 years ago

I don't know if there's an easier way to do it but.. my way is to get the player's accessories then insert them into a table and put them in the NPC. Get the NPC to be the same color as the player. Get the player's clothes and face.

I'm assuming you know how to get the clothes, skin color, etc But I don't know if you can do the accessories... Here

local acccessory = {}
    local accessory1 = game.Player.LocalPlayer.Character:FindFirstChild("Humanoid"):GetAccessories()
    for i, v in pairs(accessory1) do
        table.insert(acccessory, v:clone())
    end
    for i, v in pairs(acccessory) do 
        dummy.Humanoid:AddAccessory(v)  

    end

I'm sorry if this isn't the easiest way but I only found this solution ¯_(?)_/¯

0
Thank you so much! It worked flawlessly. uhSaxlra 181 — 5y
0
You're welcome. It really makes me happy when I actually do help people. Grainless_Bread 132 — 5y
Ad

Answer this question