Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

how to get the name of a hat from the catalog ?

Asked by 10 years ago

this will get the username but i want the name of the item from the catalog "1029025" -The Classic ROBLOX Fedora-

function UsernameFromID(ID)
    if type(ID) ~= "number" then
        return
    end
    local sets = game:service("InsertService"):GetUserSets(ID)
    for k, v in next, sets do
        if v.Name == "My Models" then
            return v.CreatorName
        end
    end
end

print(UsernameFromID(1029025))

1 answer

Log in to vote
1
Answered by 10 years ago

Implement this somehow in your code:

local Asset = game:GetService("MarketplaceService"):GetProductInfo(1029025)
print(Asset.Name)
0
thanks Layfonex 0 — 10y
Ad

Answer this question