GetUserSets (Method)

(Redirected from GetUserSets)
GetUserSets( Integer userId )
Returns Table userSets
Description: Returns a list of that user's sets.
Member of: InsertService

Here is a diagram of the table this returns:

Table sets { -- all the sets

Table set { -- a single set, there can be any number of these.
Integer CategoryId -- the set's CategoryId.
Integer ImageAssetId -- the set's image's assetid.
String Description -- the set's description.
Integer AssetSetId -- the set's setId.
String Name -- the set's name.
String CreatorName -- the set's creator's username.
String SetType -- the set's type.
}

}

InsertService = game:GetService("InsertService")

Sets = InsertService:GetUserSets(1)

Set = Sets[1]

SetId = Set.AssetSetId

Collection = InsertService:GetCollection(SetId)

Model = Collection[1]

AssetId = Model.AssetId

InsertedModel = InsertService:LoadAsset(AssetId)

InsertedModel.Parent = Workspace

Would effectively be the same as

game:GetService("InsertService"):LoadAsset(game:GetService("InsertService"):GetCollection(game:GetService("InsertService"):GetUserSets(1)[1].AssetSetId)[1].AssetId).Parent = Workspace