Hi I recently discovered insert service can only insert models that the owner has in their inventory.
I want to make a script that checks the player’s inventory so it can inform them that they need that model in order for the script to fully function (I got the gui stuff sorted already)
I checked the DevHub and saw a script similar to what I want, but it will only work with assets from the “catalog” and not the “library”
Is their a way to make a script similar like this but for library models? Sorry its just im a bit new with these like model id things
local ASSET_ID = 30331986
local ASSET_NAME = "Midnight Shades"
local Players = game:GetService("Players")
local MarketplaceService = game:GetService("MarketplaceService")
local PlayerOwnsAsset = MarketplaceService.PlayerOwnsAsset
Players.PlayerAdded:Connect(function (player)
local success, doesPlayerOwnAsset = pcall(PlayerOwnsAsset, MarketplaceService, player, ASSET_ID)
if doesPlayerOwnAsset then
print(player.Name .. " owns " .. ASSET_NAME)
else
print(player.Name .. " doesn't own " .. ASSET_NAME)
end
end)