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)
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)