Prompt Purchase not working?

I know this sounds simple but this for some reason it can’t “Cast Instance to int64”. Did Roblox change something?

local s = game:GetService("MarketplaceService")
script.Parent.MouseButton1Click:Connect(function()
	s:PromptProductPurchase(game.Players.LocalPlayer, script.Parent.Parent.PurchaseId)
end)

image

You should do: script.Parent.Parent.PurchaseId because you’re passing the actual object as an argument in the PromptProductPurchase function, instead of its value:

local s = game:GetService("MarketplaceService")
script.Parent.MouseButton1Click:Connect(function()
	s:PromptProductPurchase(game.Players.LocalPlayer, script.Parent.Parent.PurchaseId.Value)
end)

Where is the script at in the image?

edit: didnt mean to reply to you lol

Goldembyte, Its in purchase imagebutton.

Use script.Parent.Parent.PurchaseId.Value. You need to get the value of what is inside the object.

Phew, I though I was the only one who forgets to put .Value after something aha