So Roblox have something called AssetType and it has all the assets in number form so I converted it into name form! Check the table below for the code
This can be used if your making something that includes getting the asset type and displaying it! I hope it is useful because it took me a while to make it :I
No point in this when you can automate it with code so that if any new enums are added then your table will also contain them. Additionally, the chances you’ll need to do this over directly referencing only the enums you need for your current system are slim. Usually the exception cases are for working with avatar customisation when needing to sort types.
local assetTypes do
local assetTypeEnums = Enum.AssetType:GetEnumItems()
assetTypes = table.create(#assetTypeEnums)
for _, enumItem in ipairs(assetTypeEnums) do
table.insert(assetTypes, enumItem.Name)
end
end
print(assetTypes)
Not to mention that your table has wrong names (accessory types do not have a space in their name) and missing values (47-62 among others), creating an array with gaps. The above will provide a gapless array.
I really appreciate people like you who try to contribute things enthusiastically. Of course there is always the risk of unknown alternative solutions, but don’t stop contributing.
“It doesn’t work” doesn’t tell me anything. Details on how you deployed this code and found it “not to work” please. That means modifications, existing code where this was placed, errors and the like.
That sounds like a problem with the way you’re trying to integrate this in your code. Feel free to PM me or create a thread in Scripting Support to resolve issues and include relevant details so you can be helped. I don’t want to further derail this thread into focusing on my alternative suggestion.