Trying to make an NPC that disguises as a random person ingame by cloning their clothes and hats and putting it inside said NPC? Here is what I was thinking of:
m = game.Players:GetChildren() Player = m[math.random(1,#m)] Player.Pants:Clone().Parent = game.Workspace.NPC Player.Shirts:Clone().Parent = game.Workspace.NPC
Any help will be appreciated.
Never mind, I answered my own question. Heres the script if anyone needs it.
game.Players.PlayerAdded:Connect(function(plr) plr.CharacterAdded:Connect(function(char) char:WaitForChild("Shirt" and "Pants") char.Archivable = true local d = char.Shirt local s = char.Pants
d:Clone().Parent = game.Workspace.Flanker s:Clone().Parent = game.Workspace.Flanker end) end)
Replace Flanker with the name of the NPC.
Also local d and local s can be replaced. For example local s = char:Clone()