That’s why you need to convert the catalogue id to an assetId yourself. You can feed the MeshPart id filled in by the user to MarketplaceService.GetProductInfo with InfoType Enum.InfoType.Asset, then extract the AssetId in the returned dictionary and apply that as the MeshPart MeshId.
This is what i did.
It just gives back the same ID
local num = script.Parent.Text
local info = game:GetService(“MarketplaceService”):GetProductInfo(num, Enum.InfoType.Asset)
local val = info.AssetId
print(val)
script.Parent.Parent.Viewport.MeshPart.Mesh.MeshId = “http://www.roblox.com/asset/?id=”…val
That’s… interesting. It’s not supposed to do that. Out of curiosity, are there any errors that get thrown while this function is ran? Do the server and the client return the same number that you fed into GetProductInfo as the AssetId?
I find that to be fairly interesting. Either I’m not understanding the usage of GetProductInfo or it truly isn’t returning the correct thing.
Out of curiosity, mind iterating through the table and seeing if any of the values match the id that was found above as the AssetId?
local MarketplaceService = game:GetService("MarketplaceService")
local ProductInfo = MarketplaceService:GetProductInfo(430072734, Enum.InfoType.Asset)
local value = 430072717
local function matchToValue(array, findValue)
for key, value in pairs(array) do
if value == findValue then
return key, value
end
end
return nil, "N/A"
end
print(matchToValue(ProductInfo, value))
See if this prints anything other than nil and N/A. You can even add prints above the returns to print out the key and value to see if any of the match to the AssetId rather than the catalogue id.
Getting exam results, can’t test this myself.
The only other options I know are to use an external service (not reliable) and InsertService (can only insert items you own).
Always prints nil N/A i even tried changing the ids but still nil N/A
i even tried my own version of this script:
local MarketplaceService = game:GetService("MarketplaceService")
local ProductInfo = MarketplaceService:GetProductInfo(1484150498, Enum.InfoType.Asset)
local value = 1484150481
if ProductInfo.AssetId == value then
print("YAY")
else
print(ProductInfo.AssetId.." ~= "..value)
end
it always prints out the second thing
all of this could work only if you could change meshids for meshparts