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

cant seem to get my buy shirt e circle working?

Asked by 3 years ago

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

0
2 questions. #1. where did you place this script? #2. Is it a local or serverscript? Xyternal 247 — 3y
0
#1 workplace.part.script / workplace.part.ProximityPrompt (same part) at the moment #2 normal script mintywintytinty 2 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

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.

0
it worked thanks, but i had to change the script up a bit mintywintytinty 2 — 3y
Ad

Answer this question