Classic T-Shirt Giver when a part is clicked

Hey Developers :wave:

Trying to do something real fast, but I am kinda clueless when it comes to giving a player clothing, so,

How would I make a part give a player a classic t-shirt (not shirt) when it is clicked?

I tried using ShirtGraphics but I didn’t get far. Any help very appreciated!

3 Likes

hi!

first, create a part, and then insert a script and a ClickDetector inside of it. the hierarchy should look like this:
image
next, create a ShirtGraphic instance inside of ReplicatedStorage and name it T-Shirt. paste in the id of your t-shirt into the shirt graphic. you can also use decals if you wish!

after youve created your t-shirt, paste in this code to your script.

local ClickDetector = script.Parent.ClickDetector
local Shirt = game.ReplicatedStorage["T-Shirt"]

ClickDetector.MouseClick:Connect(function(Player)
	local Character = Player.Character
	local NewShirt = Shirt:Clone()
	
	NewShirt.Parent = Character
end)

after that, you’re done!
done

if you would like me to explain anything in further detail, let me know!

6 Likes

Woah, thank you so much for the in-depth reply, time and effort!

Works perfectly! :heart_hands:

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.