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

cant seem to get my buy shirt e circle working?

so basicly i am making a game for my friend and there is a merch shop were you buy merch, i am trying to use ProximityPrompt to buy a shirt here is the script

local button = script.Parent
local cleanSweepId = 5142337374

button.ProximityPrompt.Triggered:Connect(function()
	Game:GetService("MarketplaceService"):PromptPurchase(player, cleanSweepId)
end)

if anyone can help please do and it help me out alot, thanks :D

2 comments

0

2 questions. #1. where did you place this script? #2. Is it a local or serverscript?

0

#1 workplace.part.script / workplace.part.ProximityPrompt (same part) at the moment #2 normal script

1 answer

✓ Accepted answer

You use a LocalScript in StarterGui, so it is only Visible for One Player.

local Prox = workspace <-- Your Code from T-shirt (workspace.T-shirt.ProximityPromt) do		
local MS = game:GetService("MarketplaceService") do	
local cleanSweepId = 5142337374
	
Prox.Triggered:Connect(function()
	print("Buy T-shirt")
	MS:PromptPurchase(game.Players.LocalPlayer, cleanSweepId)
end)

I think that should be working.

1 comment

0

it worked thanks, but i had to change the script up a bit

This discussion is preserved as it was. New answers, comments, and votes are closed.