Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Can I check for purchase on Chat Scripts?

Asked by 2 years ago
Edited 2 years ago

I wanted to know if I could check if a Developer Product was bought but in the "Speaker" Module Script (Chat.ChatServiceRunner.Speaker, the game focuses on chatting).

Could anyone tell me if it is even possible to run such a command in this type of script? Or maybe I just wrote something wrong?

It looks like the script is not printing anything at all.

I am still a beginner and I got the script from the Roblox dev website.

game:GetService("MarketplaceService"):PromptProductPurchase(pl, devPro[chatLength])

game:GetService('MarketplaceService').PromptPurchaseFinished:Connect(function(player, assetId, isPurchased)
    if isPurchased== true then
        print("Purchase successful")
    else
        print("Purchase failed")
    end
end)
0
I myself am just at th simple stage, I am well god at scripting, I do not understand most of the stuff but when you wrote the script did you consider isPurchased to be even a variable? fudgecakeyuo 0 — 2y
0
"isPurchased" is a value passed from "PromptPurchaseFinished." TheeDeathCaster 2368 — 2y
0
I can try to write this script somewhere else just to see if it works. Could anyone help me write a PromptPurchaseFinished script from scratch, simply printing whether the purchase was successful or not? Macperolek 7 — 2y

Answer this question