I’m trying to make a system to buy houses/apartments.
I’m aware of the PromptGamePassPurchaseFinished function but this will call a function even if the player cancels the purchase. How would I make a function that will only work if the player actually buys the item?
My current code:
MarketPlaceService.PromptGamePassPurchaseFinished:Connect(function(p, id)
local c = soldsign:GetChildren()
for i,c in pairs (c) do
c.Transparency = 0
end
buysign:Destroy()
end)
Thanks!