Generally speaking, how would you give a player these things via scripting?
COMMUNITY QUESTION
How do I give players shirts, pants and a hat?
1 answer
First, you should check if the character has a shirt or pants on, and remove those. You can use the FindFirstChild method for this.
if char:FindFIrstChild("Shirt") then
char.Shirt:Destroy()
end
if char:FindFIrstChild("Pants") then
char.Pants:Destroy()
end
After that, you can instance a Shirt or Pants, set their ShirtTemplate or PantsTemplate property to set the template that will be used.
Once you've done that, adding a hat is as simple as cloning one then setting it's parent to the character.
This discussion is preserved as it was. New answers, comments, and votes are closed.
