My PromptPurchase script for an animation bundle isn't working. Can anyone help?

As the title says, my script for prompt purchasing an animation isn’t working.
Anyone know why? Thanks!

local AnimationID = 75
local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:connect(function()
game:GetService(“MarketplaceService”):PromptPurchaseBundle(player, AnimationID)
end)

Instead of using the player instance, I’m pretty sure you have to use the UserID.
Replace
game.Players.LocalPlayer

with

game.Players.LocalPlayer.UserId

2 Likes

Instead of quoting, use Lua Blocks so it is easier to read:

local ZL = workspace.ZL

ZL.Field:Destroy()

If this fixes your issue, you should flag me as a solution. Thanks!

Maybe because PromptPurchaseBundle doesn’t work yet? Currently purchasing bundles through games is not possible. However, it will be soon, in Release Notes 458 it currently shows up as “Pending”.

Try putting this in a server script, maybe? (Fire a Remote Event).