So, basically I decided to check out a Roblox document about marketplaceservice:promptpurchase. I got this weird error stating:
MarketplaceService:PromptProductPurchase() player should be of type Player, but is of type Players
If it has to be a local script, I cant do that since proximity prompt doesn't work for local scripts.
Script:
local ProximityPrompt = script.Parent
local player = game:getService("Players")
local productId = 1164763860
ProximityPrompt.Triggered:Connect(function()
game:GetService("MarketplaceService"):PromptProductPurchase(player, productId)
if productId == 1164763860 then
print("Test")
elseif productId == 1164763860 then
print("Test")
end
end)

1 comment
im lazy to be formal but if you understand then do anything if you want