Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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.

1 comment

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

1 answer

✓ Accepted answer

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 ¯_(?)_/¯

2 comments

0

Thank you so much! It worked flawlessly.

0

You're welcome. It really makes me happy when I actually do help people.

This discussion is preserved as it was. New answers, comments, and votes are closed.