I want to use values for marketpalce service, so I can use a value to determinate the player & the asset ID
Current script:
function onTouched()
player = script.Parent.Parent.playerId.Value
id = script.Parent.Parent.assetId.Value
game:GetService("MarketplaceService"):PromptProductPurchase(player, id)
end
script.Parent.MouseButton1Click:connect(onTouched)
but I get this error:
19:23:41.748 - Unable to cast value to Object
19:23:41.751 - Script 'Workspace.Till.Till.SurfaceGui.Frame.pay.Script', Line 4
Please help! |