--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 ShirtID = 3452655081
local ShirtIDW = "http://www.roblox.com/asset/?id=3452655081" --id de la prenda "3452655081"
local MarketplaceService = game:GetService("MarketplaceService")
--
--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 = ShirtIDW
end)
--
---
-- Comprar Prenda:
comprar.MouseButton1Click:Connect(function()
game:GetService("MarketplaceService"):PromptPurchase(PN,ShirtID)
end)
--
Its the " compra " button but doesn’t works.
It gives me this error.