Why does it keep saying this item is currently not for sale?
Asked by
4 years ago Edited 4 years ago
--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)