Luanoid
Properties
CharacterState
Name
Luanoid.Name:
string
A non-unique identifier of the Luanoid
MoveDirection
Luanoid.MoveDirection:
Vector3
Describes the direction that the Luanoid is walking in, as a unit vector along the X/Z axis.
LookDirection
Luanoid.LookDirection:
Vector3
Describes the direction that the Luanoid is facing, as a unit vector along the X/Z axis.
Health
Luanoid.Health:
number
Describes the current health of the Luanoid.
MaxHealth
Luanoid.MaxHealth:
number
Describes the maximum health of the Luanoid.
WalkSpeed
Luanoid.WalkSpeed:
number
A reference to a part whose position is trying to be reached by a Luanoid.
JumpPower
Luanoid.JumpPower:
number
Determines how much upwards force is applied to the Luanoid when jumping.
HipHeight
Luanoid.HipHeight:
number
Describes the maximum health of the Luanoid.
MaxSlopeAngle
Luanoid.MaxSlopeAngle:
number
Determines the distance off the ground the RootPart should be.
AutoRotate
Luanoid.AutoRotate:
boolean
AutoRotate sets whether or not the Luanoid will automatically rotate to face in the direction they are moving in.
Jump
Luanoid.Jump:
boolean
If set to true, it will cause the Luanoid to jump.
Animator
This item is read only and cannot be modified. Read OnlyLuanoid.Animator:
Animator
A reference to the Animator responsible assigned to the Luanoid.
CharacterController
Luanoid.CharacterController:
CharacterController
A reference to the CharacterController assigned to the Luanoid.
Character
This item is read only and cannot be modified. Read OnlyLuanoid.Character:
Model
A model controlled by the Luanoid
Floor
Luanoid.Floor:
BasePart
A reference to the Instance the Luanoid is currently standing on. If the luanoid isn't standing on anything, the value of this property will be nil. Although this property is not read-only it should only be edited by StateControllers.
FloorMaterial
This item is read only and cannot be modified. Read OnlyLuanoid.FloorMaterial:
Material
Describes the Material that the Luanoid is currently standing on. If the Luanoid isn’t standing on anything, the value of this property will be Air.
Mover
This item is read only and cannot be modified. Read OnlyLuanoid.Mover:
VectorForce
A force that is applied to the Luanoid’s RootPart to move it. Intended only for use in CharacterControllers.
Aligner
This item is read only and cannot be modified. Read OnlyLuanoid.Aligner:
AlignOrientation
A force that is applied to the Luanoid’s RootPart to orient it. Intended only for use in CharacterControllers.
RootPart
This item is read only and cannot be modified. Read OnlyLuanoid.RootPart:
BasePart
A reference to the Luanoid's HumanoidRootPart. Despite Luanoids not having Humanoids the RootPart maintains Humanoid in its name for better compatibility.
RigChanged
This item is read only and cannot be modified. Read OnlyFires after SetRig()
finishes executing.
AccessoryAdded
This item is read only and cannot be modified. Read OnlyFires after AddAccessory()
finishes executing.
AccessoryRemoving
This item is read only and cannot be modified. Read OnlyFires after RemoveAccessory()
finishes executing.
Died
This item is read only and cannot be modified. Read OnlyLuanoid.Died:
Signal
<
(
isDead:
boolean
)
>
Fires after entering or while leaving CharacterState.Dead
FreeFalling
This item is read only and cannot be modified. Read OnlyLuanoid.FreeFalling:
Signal
<
(
isFreeFalling:
boolean
)
>
Fires after entering or while leaving CharacterState.FreeFalling
HealthChanged
This item is read only and cannot be modified. Read OnlyLuanoid.HealthChanged:
Signal
<
(
newHealth:
number
)
>
Fires after Health is changed
Jumping
This item is read only and cannot be modified. Read OnlyLuanoid.Jumping:
Signal
<
(
isJumping:
boolean
)
>
Fires after entering or while leaving CharacterState.Jumping
MoveToFinished
This item is read only and cannot be modified. Read OnlyLuanoid.MoveToFinished:
Signal
<
(
success:
boolean
)
>
Fires after a promise from MoveTo()
resolves.
Seated
This item is read only and cannot be modified. Read OnlyLuanoid.Seated:
Signal
<
>
StateChanged
This item is read only and cannot be modified. Read OnlyFires after the Luanoid's state is changed.
Touched
This item is read only and cannot be modified. Read OnlyLuanoid.Touched:
Signal
<
>
Destroying
This item is read only and cannot be modified. Read OnlyLuanoid.Destroying:
Signal
<
>
Fires while Destroy()
is executing.
Functions
new
Creates a new Luanoid.
Destroy
Luanoid:
Destroy
(
) →
(
)
Destroys the Luanoid.
SetRig
Assigns a rigged model as the Luanoid's character.
RemoveRig
Luanoid:
RemoveRig
(
) →
(
)
Removes the Luanoid's current character rig.
ApplyDescription
Makes the character's look match that of the passed in HumanoidDescription.
If no rigType
is provided a new rig will not be applied. Setting
HumanoidDescription.Shirt
and HumanoidDescription.Pants
to any negative
value will have it ignore the rig's current shirt and pants rather than
clearing them.
GetAppliedDescription
Returns HumanoidDescription which describes its current look.
BuildRigFromAttachments
Luanoid:
BuildRigFromAttachments
(
) →
(
)
Assembles a tree of Motor6D joints by attaching together Attachment objects in a Luanoid's character.
TakeDamage
Luanoid:
TakeDamage
(
damage:
number
) →
(
)
Lowers the health of the Luanoid by the given positive amount.
Move
Causes the Lumanoid to walk in the given direction.
MoveTo
Luanoid:
MoveTo
(
) →
Promise
<
boolean
>
Causes the Luanoid to attempt to walk to the given location and part. Use a timeout of 0 for no timeout. The returned promise can also be cancelled.
AddAccessory
Luanoid:
AddAccessory
(
) →
(
)
Adds an accessory to the Luanoid's character.
RemoveAccessory
Removes an accessory from the Luanoid's character.
GetAccessories
Returns a list of all accessories attached to the Luanoid.
RemoveAccessories
Luanoid:
RemoveAccessories
(
) →
(
)
Removes all accessories from the Luanoid.
GetNetworkOwner
Returns the current player who is the network owner of the Luanoid, or nil in case of the server.
SetNetworkOwner
Sets the given player as network owner for this Luanoid. When player
is
nil, the server will be the owner instead of a player.
IsNetworkOwner
Luanoid:
IsNetworkOwner
(
) →
boolean
Returns if the current machine is the network owner of the Luanoid.
GetState
Returns the Luanoid's current CharacterState.
ChangeState
Set the Luanoid to the given CharacterState.