I am trying to make a local script that makes a npc have the same Skin Color as the Player. I dont know how that works. I tried this:
Skin = game.Players.LocalPlayer.Character:FindFirstChild("Body Colors") Skin:Clone().Parent=script.Parent
Its prob all wrong. Can anyone Help?
A way to do this would be:
01 | local plr = game.Players.LocalPlayer |
02 | local char = plr.Character or plr.CharacterAdded:Wait() |
03 | local Skin = char:WaitForChild( "Body Colors" ) |
04 |
05 | local SkinTarget = workspace.Dummy |
06 |
07 | local skinTargeted = SkinTarget:FindFirstChild( "Body Colors" ) |
08 |
09 | skinTargeted:Destroy() |
10 | Skin.Parent = SkinTarget |
The local SkinTarget has to be configured to be the NPC's model. hope this helps!