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

How do you insert Pant into a player or so?

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?

1 answer

✓ Accepted answer

Using the Pants object, you can insert pants into the player. Just set the pants template to the asset id of the pants you intend to use.

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