Help with buying shirt script

My issue is that doesn’t works when I do a promptPurchaseEvent

My code:


--Variables:

local P = game.Players.LocalPlayer
local PN = P.Name
local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
local comprar = script.Parent.Comprar
local costeP = script.Parent.CosteP
local nombreP = script.Parent.NombreP
local prendaImagen = script.Parent.Prenda
local CerrarG = script.Parent.CerrarGUI
local probarP = script.Parent.ProbarP
local ReplicatedStorage = game:GetService("ReplicatedStorage")


--




--Codigo:


-- Borrar GUI con la " X " 

CerrarG.MouseButton1Click:Connect(function()
	
script.Parent:Destroy()
	
end)

--

---

-- Mostrar ropa en ImagenLabel:

probarP.MouseButton1Click:Connect(function()
	
	game.Workspace[PN].Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=3452655081"
		
end)



--

---

-- Comprar Prenda:

comprar.MouseButton1Click:Connect(function()
	local promptPurchaseEvent = ReplicatedStorage:WaitForChild("PromptPurchaseEvent")
	promptPurchaseEvent:FireServer(3452655081)
	
end)

--

It doesn’t gives me any error, it just doesn’t give the buy shirt GUI

What does “it doesn’t work” mean? What isn’t working, the LocalScript or the Script which is consuming invocations? You need to supply more details and more code than just this.

On a separate note, if PromptPurchaseEvent is just being used to prompt the purchase you could just do it right from the LocalScript, no need for a RemoteEvent there. Don’t know what PromptPurchaseEvent is so this is just in the instance that it’s only being used for PromptPurchase.

1 Like


Sorry, I forget to send you how it is ( Ingore the " Traje " )

Hmmm, I still not knowing why this happens…

Uhhh idk why this stills happening…