Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you insert Pant into a player or so?

Asked by 9 years ago
01pants = script.Parent.Pants:GetChildren()
02shirts = script.Parent.shirts:GetChildren()
03faces = script.Parent.Faces:GetChildren()
04hairs = script.Parent.Hair:GetChildren()
05maindummy = game.Workspace.Camera.Dummy_3D
06dummy = script.Parent.Dummy
07repeat wait() until maindummy and dummy and hairs and faces and shirts and pants
08 
09script.Parent["Pant Label"].Next.MouseButton1Click:connect(function()
10    curSpawn = pants[math.random(1,#pants)]
11    wait() --Let the Character fully load
12    for _,v in pairs(maindummy:GetChildren()) do
13            if v:IsA("Pants") then
14                v:Destroy()
15                curSpawn = maindummy
View all 24 lines...

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

Log in to vote
0
Answered by
Pyrondon 2089 Game Jam Winner Moderation Voter Community Moderator
9 years ago

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.

Ad

Answer this question