I defined how a proper R6 character structure should look like.
export type R6Character = Model & {
["Humanoid"]: Humanoid,
["Head"]: Part & {
["Face"]: Decal
},
["HumanoidRootPart"]: Part & {
["Root Hip"]: Motor6D
},
["Left Arm"]: Part,
["Left Leg"]: Part,
["Right Arm"]: Part,
["Right Leg"]: Part,
["Torso"]: Part & {
["Left Hip"]: Motor6D,
["Left Shoulder"]: Motor6D,
["Neck"]: Motor6D,
["Right Hip"]: Motor6D,
["Right Shoulder"]: Motor6D
}
}
return {}
And when I tried to index a child it treated it as a regular table.
How can I define a type so that the Luau type checker will treat Left Arm
as a child of an instance called Character
?