i have a part with a script and a click detector so whenever someone clicks it they can purchase my tshirt. But i want to make it where when they clcik the part and purchase my tshirt, i want them to receive a knife bundle that i made inside there assassin inventory. sorta like when they purchase VIP and the game gives them a kinfe and effect.
what script do i use to make it happen?
yes, i already have a part with a script and click detector.
heres what i want them to receive after they purchase my tshirt: https://www.roblox.com/catalog/846792499/Blue-Laser-Scythe
https://www.roblox.com/catalog/4879823654/Blue-Scythe
I believe you can paste this code into the command bar, and load the gear into your game. Then you can handle the cloning to the player's backpack.
game:GetService("InsertService"):LoadAsset(ASSET ID).Parent = game.Workspace
You might even be able to use this code to load the asset into the backpack, but I would recommend just making a folder of tools and using :Clone(). I also recommend using a gamepass, not a T-Shirt.
If you don't already have a script to check if they own the shirt, try using this: https://developer.roblox.com/en-us/api-reference/event/MarketplaceService/PromptPurchaseFinished
EDIT: You actually can use Insert Service to load the asset. As I said, I would recommend just inserting it to the workspace, but here's an example on how you could load the Laser Scythe.
game.Players.PlayerAdded:Connect(function(plr) game:GetService("InsertService"):LoadAsset(846792499).LaserScythe.Parent = plr:WaitForChild("Backpack") end)