--Server script in serverscriptservice
rs = game:GetService("ReplicatedStorage")
ms = game:GetService("MarketplaceService")
remotes = rs.Remotes
pp = remotes:WaitForChild("Prompt_Purchase")
pp.OnServerEvent:connect(function(player, id)
print(player.Name..", "..id)
ms:PromptPurchase(player, id)
end)
--Local script in startergui
rs = game:GetService("ReplicatedStorage")
player = game:GetService("Players").LocalPlayer
mouse = player:GetMouse()
remotes = rs.Remotes
pp = remotes:WaitForChild("Prompt_Purchase")
mouse.Button1Up:connect(function()
if mouse.Target.Name == "Purchase_Button" then
local property = mouse.Target.Parent.Parent.Figure:FindFirstChild(mouse.Target:FindFirstChildOfClass("StringValue").Name)[mouse.Target:FindFirstChildOfClass("StringValue").Name.."Template"]
local str = tostring(property)
local id = tonumber(str:match("%d+"))
pp:FireServer(id)
end
end)
COMMUNITY QUESTION
Why does it keep saying this item is currently not for sale?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
local property is basically getting the property ShirtTemplate or PantsTemplate from the clothing asset and then it gets the number from the link