rbx-yield-for-character-parts
v0.0.3
Published
Yield until all members of a character rig exist, then dot access!
Downloads
5
Maintainers
Readme
Yield for Character Parts
Usage:
Pass a Player's Character Model into yieldForR15CharacterDescendants or yieldForR6CharacterDescendants, which will yield via WaitForChild until all the members defined in the code exist (all members except those generated by Sound/Animate scripts). The function will return a promise, and, once these members exist, the model with all its members defined will be accessible through the then method.
yieldForR15CharacterDescendants(character).then(CharR15 => {
// All members are properly typed and defined!
CharR15.Head.face.Texture = ""
});Meant to be used with rbx-safe-types, although it should also work with rbx-types.
