skeleton:getSlot()¶
Type:
functionSee also: skeleton, skeleton:findSlot()
Overview:¶
Returns a Slot userdata for the specified slot name, or throws an error if not found.
Syntax:¶
local slot = skeleton:getSlot(slotName)
slotName(required):string– The name of the slot to search for.
Example:¶
local swordSlot = hero:getSlot("swordHand")
if swordSlot then
print("Got slot:", swordSlot.name)
end