Hey everyone, I don't know if this is because it is currently midnight or not but for some reason this is always returning nil even though when I tested it in the command bar it works fine.
And before anyone asks here is the asset: https://www.roblox.com/library/2007144377/Hawk-T2
function script.Parent.GetAsset.OnServerInvoke(id)
local asset
local success = pcall(function()
asset = game:GetService("MarketplaceService"):GetProductInfo(id)
end)
if success then
return asset
end
return nil
end
Custom Error:
Unable to get asset from ID "2007144377"
Asset id checks out.
Thanks for the help to anyone that replies!

1 comment
Technically they don't. If success then is a fine code. It basically is: if success == true then.