I was trying to print the names of the models in my set that I have by using GetUserSets method but I keep getting a error saying:
Workspace.Script:8: attempt to index global 'Model' (a nil value)
Why is it showing vairble Model as nil?
InsertService = game:GetService("InsertService")
UserSets = InsertService:GetUserSets(1077607)
Set = UserSets[1] -- Think of this like a tablet Set 1 = 1 Set 2 = 2 and so on
SetId= Set.AssetSetId
Collection = InsertService:GetCollection(SetId)
for i = 1,10 do
Model = Collection[i]
AssestId = Model.AssestId
print(AssestId.Name)
end

3 comments
Thanks for the help,but now it won't print any of the names why?
assetIdis a number, soassetId.anythingdoesn't make sense. To get the name, usemodel.namenotassetId.NameAs an addenum, kevinnight, I suggest looking up generic for loops, which are designed for iterating through tables, like you do here.