slot:getAttachments()

Type: function

Overview:


Returns a table of all attachments available for this slot. If you only want to know the current attachment, use slot.attachment or if you want to know all the attachments for a given skin, use slot:getSkinAttachments().

Syntax:


local attachments = slot:getAttachments(slotName)

Return value:


table – A table of strings, each representing an attachment name.

Example:


local slot = skeleton.slots[1]
local attachments = slot:getAttachments(slotName)

for i = 1, #attachments do
    print("Attachment:", attachments[i])
end