pants = script.Parent.Pants:GetChildren()
shirts = script.Parent.shirts:GetChildren()
faces = script.Parent.Faces:GetChildren()
hairs = script.Parent.Hair:GetChildren()
maindummy = game.Workspace.Camera.Dummy_3D
dummy = script.Parent.Dummy
repeat wait() until maindummy and dummy and hairs and faces and shirts and pants
script.Parent["Pant Label"].Next.MouseButton1Click:connect(function()
curSpawn = pants[math.random(1,#pants)]
wait() --Let the Character fully load
for _,v in pairs(maindummy:GetChildren()) do
if v:IsA("Pants") then
v:Destroy()
curSpawn = maindummy
end
end
for _,v in pairs(dummy:GetChildren()) do
if v:IsA("Pants") then
v:Destroy()
curSpawn = dummy
end
end
end)
So I have this folder in my explorer that has like a lot of pants and I want it to random choose the one of it and copy and paste it into the player, how would I do that?
