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

How do I give a player a T-Shirt?

Asked by 6 years ago

Recently I've been using a method that allows scripts to give T-Shirts to people. But now I've forgotten. Can you help me?

2 answers

Log in to vote
0
Answered by 6 years ago

Try this:

--Put your T-Shirt ID here
local TshirtId = "T-shirt ID goes here"

--Shows the buy T-Shirt GUI
script.Parent.ClickDetector.MouseClick:connect(function(player)
    game:GetService("MarketplaceService"):PromptPurchase(player, TshirtId)
end)
0
Thank you! CrastificeDude612 71 — 6y
Ad
Log in to vote
0
Answered by
ax_gold 360 Moderation Voter
6 years ago

this should give your character a T-shirt when they spawn:

game.Players.PlayerAdded:connect(function(Player)
    Player.CharacterAdded:connect(function(Character)
        local TShirt = Instance.new("ShirtGraphic", Character)
    end)
end)
0
I need something that actually gives it from the store, like making someone buy a t-shirt. CrastificeDude612 71 — 6y

Answer this question