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

How do I change the shirt of a player ?

Asked by 9 years ago

I am trying to add to that clothing store I mentioned about earlier by adding in a shirt item to purchase using game cash. However I don't know how to clone or to the player properly to where it shows up on their torso. How do I code this?

1 answer

Log in to vote
3
Answered by 9 years ago

Changing a shirt isn't a torso property. A shirt is an Instance, like a part. If someone is wearing a shirt, an instance named "Shirt" will be in their character with a little shirt symbol next to it. To change the shirt, I believe all you have to do is:

game.Players.LocalPlayer.Character.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=--[[put whatever the ID of the shirt is, found at the end of a URL]]"

Now, if the player doesn't already have a shirt equipped from their personal inventory, you'll have to make them one, via Instance.new("Shirt").

Ad

Answer this question