The Value is the Id and it’s a shirt but I get “error” in the output which means Roblox doesn’t think it’s a shirt, pants, or face even tho it is a shirt
local Event = game.ReplicatedStorage.RemoteEvents.AvatarSystem.Wear
Event.OnServerEvent:Connect(function(player,Value)
local Info = game:GetService("MarketplaceService"):GetProductInfo(Value)
if Info.AssetTypeId == (Enum.AssetType.Shirt) then
local model = game:GetService("InsertService"):LoadAsset(Value)
player.Character.Shirt:Destroy()
model.Parent = workspace
model.Shirt.Parent = player.Character
model:Destroy()
print("Asset = shirt")
elseif Info.AssetTypeId == (Enum.AssetType.Pants) then
local model = game:GetService("InsertService"):LoadAsset(Value)
player.Character.Pants:Destroy()
model.Parent = workspace
model.Pants.Parent = player.Character
model:Destroy()
print("Asset = pants")
elseif Info.AssetTypeId == (Enum.AssetType.Face) then
-- WIP
else
print("Error")
end
end)