#prompt
22 messages · Page 1 of 1 (latest)
after the purchase the wall doesnt let me pass through
you reversed the order
function(player, gamepassId, isPurchased)
no function(player, purchased, productId)
oh wait
it still doesn't let me pass through??
local prompt = script.Parent
local door = game.Workspace.Door
local marketplace = game:GetService("MarketplaceService")
local player = game.Players.LocalPlayer
local productID = 1891130826
prompt.Triggered:Connect(function(player)
marketplace:PromptProductPurchase(player, productID)
end)
marketplace.PromptProductPurchaseFinished:Connect(function(player, productID, isPurchased)
if purchased and productId == productID then
door.CanCollide = false
wait(2)
door.CanCollide = true
end
end)
can you add a print before the if statement ?
tell me if it prints
local prompt = script.Parent
local door = game.Workspace.Door
local marketplace = game:GetService("MarketplaceService")
local player = game.Players.LocalPlayer
local productID = 1891130826
prompt.Triggered:Connect(function(player)
marketplace:PromptProductPurchase(player, productID)
end)
marketplace.PromptProductPurchaseFinished:Connect(function(player, productID, isPurchased)
print("its printing !")
if purchased and productId == productID then
door.CanCollide = false
end
end)
try that
you can also check this method
it prints
local prompt = script.Parent
local door = game.Workspace.Door
local marketplace = game:GetService("MarketplaceService")
local player = game.Players.LocalPlayer
local productID = 1891130826
prompt.Triggered:Connect(function(player)
marketplace:PromptProductPurchase(player, productID)
end)
marketplace.PromptProductPurchaseFinished:Connect(function(player, productID, isPurchased)
if purchased and productId == productID then
print("its still printing !")
door.CanCollide = false
end
end)
and tell me if it prints again
PromptProductPurchaseFinished is so easy to exploit tho
.ProccessReceipt is perfect for handling the products
it doesnt print
i changed it to that now
thanks