sentanos / roblox-js

!!!THIS PROJECT IS NO LONGER MAINTAINED!!! Execute ROBLOX website actions in node.js
MIT License
45 stars 45 forks source link

Asset.Buy(id) trying to buy wrong item? #59

Closed ytomasch closed 6 years ago

ytomasch commented 6 years ago

When I use rbx.buy(809988794), the script doesnt purchase the shirt and instead seems to try and purchase something totally different.

Code & Output:

  rbx.buy(shirt_id)
    .then(function(msg){
    var msg = JSON.stringify(msg);
    console.log("[Group 1]: Balance Stage 3 | Purchased Shirt. msg: " + msg);

[Group 1]: Balance Stage 3 | Purchased Shirt. msg: {"productId":74233074,"price":250}

sentanos commented 6 years ago

It is purchasing the shirt. For all purchasable items ROBLOX uses things called "product IDs" to identify and purchase them. They are tied to the asset ID.

As you can see here the product ID is correct: http://api.roblox.com/marketplace/productinfo?assetId=809988794