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

How do I give players shirts, pants and a hat?

Generally speaking, how would you give a player these things via scripting?

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.