Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Little Writing Changes to Humanoid Page #1006

Merged
merged 10 commits into from
Jan 30, 2025
117 changes: 59 additions & 58 deletions content/en-us/reference/engine/classes/Humanoid.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1419,7 +1419,7 @@ methods:
summary: |
Sets the `Class.Humanoid` to enter the given `Enum.HumanoidStateType`.
description: |
This function causes the `Class.Humanoid` to enter the given
This method causes the `Class.Humanoid` to enter the given
`Enum.HumanoidStateType`, describing the activity the `Class.Humanoid` is
currently doing.

Expand All @@ -1438,11 +1438,12 @@ methods:
`Enum.HumanoidStateType.PlatformStanding` will cause the humanoid state
to be automatically set to `Enum.HumanoidStateType.Running`.

Note that in order to set the `Class.Humanoid` state using this function,
you must do it in a `Class.LocalScript` owned by the NetworkOwner of the
`Class.Player.Character`. You can use this function in a `Class.Script`,
but the NetworkOwner of the `Class.Player.Character` must be the Server.

Note that in order to set the `Class.Humanoid` state using this method,
you must do so from a `Class.LocalScript` and the client must have
[network ownership](../../../physics/network-ownership.md) of the `Class.Player.Character`.
Alternatively, you can call this method from a server-side `Class.Script`, but the
server must have network ownership of the player character.

See also `Class.Humanoid:SetStateEnabled()` to enable or disable a
particular state, and `Class.Humanoid:GetState()` to get the current
humanoid state.
Expand All @@ -1467,7 +1468,7 @@ methods:
summary: |
Makes the `Class.Humanoid` equip the given `Class.Tool`.
description: |
This function makes the `Class.Humanoid` equip the given `Class.Tool`.
This method makes the `Class.Humanoid` equip the given `Class.Tool`.

The below example would cause a `Class.Player` to equip a tool in
`Class.Workspace` named _'Tool'_.
Expand All @@ -1488,13 +1489,13 @@ methods:
end
```

When this function is called, the `Class.Humanoid` will first
When this method is called, the `Class.Humanoid` will first
automatically unequip all `Class.Tool|Tools` that it currently has
equipped.

Although they will be equipped, `Class.Tool|Tools` for which
`Class.Tool.RequiresHandle` is _true_ will not function if they have no
handle, regardless if this function is used to equip them or not
handle, regardless if this method is used to equip them or not.

See also:

Expand All @@ -1520,7 +1521,7 @@ methods:
Returns an array of `Class.Accessory` objects that the humanoid's parent
is currently wearing.
description: |
This function returns an array of `Class.Accessory` objects that the
This method returns an array of `Class.Accessory` objects that the
humanoid's parent is currently wearing. All such `Class.Accessory` objects
will be included, regardless of whether they're attached or not.

Expand Down Expand Up @@ -1548,10 +1549,10 @@ methods:
Returns a copy of the humanoid's cached `Class.HumanoidDescription` which
describes its current look.
description: |
This function returns a copy of the humanoid's cached
This method returns a copy of the humanoid's cached
`Class.HumanoidDescription` which describes its current look. This can be
used to quickly determine a character's look and to assign their look to
other characters using the `Class.Humanoid:ApplyDescription()` function.
other characters using the `Class.Humanoid:ApplyDescription()` method.

#### See Also

Expand All @@ -1576,13 +1577,13 @@ methods:
writeCapabilities: []
- name: Humanoid:GetBodyPartR15
summary: |
Pass a body part to this function (the body part should be a sibling of
Pass a body part to this method (the body part should be a sibling of
Humanoid, and a child of a Model) to get the `Enum.BodyPartR15` of the
`Class.Part`.
description: |
This function returns what `Enum.BodyPartR15` a `Class.Part` is, or
This method returns what `Enum.BodyPartR15` a `Class.Part` is, or
`Enum.BodyPartR15.Unknown` if the part is not an R15 body part. This
function allows developers to retrieve player body parts independent of
method allows developers to retrieve player body parts independent of
what the actual body part names are, instead returning an enum.

It can be used in conjunction with `Class.Humanoid:ReplaceBodyPartR15()`.
Expand All @@ -1592,7 +1593,7 @@ methods:
developers can either perform some gameplay action or replace that part
with some other part - perhaps showing damage.

This function can be useful for games where hit location is important. For
This method can be useful for games where hit location is important. For
example, it can be used to determine if a player is hit in the leg and
then slow them down based on the injury.
code_samples:
Expand All @@ -1618,7 +1619,7 @@ methods:
Returns the `Enum.Limb` enum that is associated with the given
`Class.Part`.
description: |
This function returns the `Enum.Limb` enum that is associated with the
This method returns the `Enum.Limb` enum that is associated with the
given `Class.Part`. It works for both R15 and R6 rigs, for example:

```lua
Expand Down Expand Up @@ -1671,12 +1672,12 @@ methods:
Returns an array of all `Class.AnimationTrack|AnimationTracks` that are
currently being played on the `Class.Humanoid`.
description: |
This function returns an array of all
This method returns an array of all
`Class.AnimationTrack|AnimationTracks` that are currently being played on
the `Class.Humanoid`.c A typical use for this function is stopping
the `Class.Humanoid`. A typical use for this method is stopping
currently playing tracks using `Class.AnimationTrack:Stop()`.

Beware that this function will not return
Beware that this method will not return
`Class.AnimationTrack|AnimationTracks` that have loaded but are **not
playing**. If you want to track these you will need to index them
manually.
Expand All @@ -1697,7 +1698,7 @@ methods:
summary: |
Returns the humanoid's current `Enum.HumanoidStateType`.
description: |
This function returns the humanoid's current `Enum.HumanoidStateType`,
This method returns the humanoid's current `Enum.HumanoidStateType`,
describing the activity the `Class.Humanoid` is currently doing, such as
jumping or swimming.

Expand All @@ -1722,7 +1723,7 @@ methods:
Returns whether a `Enum.HumanoidStateType` is enabled for the
`Class.Humanoid`.
description: |
The GetStateEnabled function returns whether a `Enum.HumanoidStateType` is
The GetStateEnabled method returns whether a `Enum.HumanoidStateType` is
enabled for the `Class.Humanoid`.

The humanoid state describes the activity the humanoid is currently doing.
Expand Down Expand Up @@ -1760,7 +1761,7 @@ methods:
summary: |
Returns a table of the Humanoid's statuses, and custom statuses.
description: |
The GetStatuses function returns a table of the Humanoid's statuses, and
The GetStatuses method returns a table of the Humanoid's statuses, and
custom statuses.
code_samples:
parameters: []
Expand All @@ -1781,7 +1782,7 @@ methods:
summary: |
Returns boolean based on if custom statuses exist.
description: |
The HasCustomStatus function returns boolean based on if custom statuses
The HasCustomStatus method returns boolean based on if custom statuses
exist.
code_samples:
parameters:
Expand All @@ -1806,7 +1807,7 @@ methods:
summary: |
Returns a boolean based on if a status exists.
description: |
The HasStatus function returns a boolean based on if a status exists.
The HasStatus method returns a boolean based on if a status exists.
code_samples:
parameters:
- name: status
Expand All @@ -1831,7 +1832,7 @@ methods:
Loads an `Class.Animation` onto a `Class.Humanoid`, returning an
`Class.AnimationTrack` that can be used for playback.
description: |
This function loads an `Class.Animation` onto a `Class.Humanoid`,
This method loads an `Class.Animation` onto a `Class.Humanoid`,
returning an `Class.AnimationTrack` that can be used for playback.
code_samples:
parameters:
Expand All @@ -1857,10 +1858,10 @@ methods:
summary: |
Causes the `Class.Humanoid` to walk in the given direction.
description: |
This function causes the `Class.Humanoid` to walk in the given
This method causes the `Class.Humanoid` to walk in the given
`Datatype.Vector3` direction.

By default, the direction is in world terms, but If the `relativeToCamera`
By default, the direction is in world terms, but if the `relativeToCamera`
parameter is `true`, the direction is relative to the `Datatype.CFrame` of
the `Class.Workspace.CurrentCamera|CurrentCamera`. As the negative **Z**
direction is considered "forwards" in Roblox, the following code will make
Expand All @@ -1871,14 +1872,14 @@ methods:
humanoid:Move(Vector3.new(0, 0, -1), true)
```

When this function is called, the `Class.Humanoid` will move until the
function is called again. However, if the default control scripts are
being used, this function will be overwritten when called on player
When this method is called, the `Class.Humanoid` will move until the
method is called again. However, if the default control scripts are
being used, this method will be overwritten when called on player
`Class.Player.Character|Characters`. This can be avoided by either not
using the default control scripts, or calling this function every frame
using `Class.RunService:BindToRenderStep()` (see example).

This function can be called on the server, but this should only be done
This method can be called on the server, but this should only be done
when the server has
[network ownership](../../../physics/network-ownership.md) of the
humanoid's assembly.
Expand Down Expand Up @@ -1914,7 +1915,7 @@ methods:
setting the `Class.Humanoid.WalkToPoint` and `Class.Humanoid.WalkToPart`
properties.
description: |
This function causes the `Class.Humanoid` to attempt to walk to the given
This method causes the `Class.Humanoid` to attempt to walk to the given
location by setting the `Class.Humanoid.WalkToPoint` and
`Class.Humanoid.WalkToPart` properties.

Expand Down Expand Up @@ -1975,11 +1976,11 @@ methods:
summary: |
Removes all `Class.Accessory` objects worn by the humanoid's parent.
description: |
This function removes all `Class.Accessory` objects worn by the humanoid's
This method removes all `Class.Accessory` objects worn by the humanoid's
parent. For player `Class.Player.Character|Characters`, this will remove
all hats and other accessories.

This function removes `Class.Accessory` object by calling
This method removes `Class.Accessory` object by calling
`Class.Instance:Destroy()` on them, meaning the
`Class.Instance.Parent|Parent` of the accessories are set to `nil` and
locked.
Expand All @@ -2003,7 +2004,7 @@ methods:
summary: |
Removes the defined custom status from the Status model in the Humanoid..
description: |
The RemoveCustomStatus function removes the defined custom status from the
The RemoveCustomStatus method removes the defined custom status from the
Status model in the Humanoid..
code_samples:
parameters:
Expand All @@ -2028,7 +2029,7 @@ methods:
summary: |
Removes the defined status from the Status model in the Humanoid.
description: |
The RemoveStatus function removes the defined status from the Status model
The RemoveStatus method removes the defined status from the Status model
in the Humanoid.
code_samples:
parameters:
Expand Down Expand Up @@ -2056,10 +2057,10 @@ methods:
Dynamically replaces a R15/Rthro limb part in a Humanoid with a different
part. The part is automatically scaled as normal.

This function is useful for modifying characters during gameplay or
building characters from a base rig. The related function
This method is useful for modifying characters during gameplay or
building characters from a base rig. The related method
`Class.Humanoid:GetBodyPartR15()|GetBodyPartR15` can come in handy when
using this function.
using this method.

The name of the part passed in should match with the name of the
BodyPartR15 Enum passed in.
Expand Down Expand Up @@ -2090,7 +2091,7 @@ methods:
Sets whether a given `Enum.HumanoidStateType` is enabled for the
`Class.Humanoid`.
description: |
This function sets whether a given `Enum.HumanoidStateType` is enabled for
This method sets whether a given `Enum.HumanoidStateType` is enabled for
the `Class.Humanoid`. When a particular `Enum.HumanoidStateType` is
disabled, the `Class.Humanoid` can never enter that state. This is true
regardless if the attempt to change state is made using
Expand Down Expand Up @@ -2126,10 +2127,10 @@ methods:
Lowers the `Class.Humanoid.Health` of the `Class.Humanoid` by the given
_amount_ if it is not protected by a `Class.ForceField`.
description: |
This function lowers the `Class.Humanoid.Health` of the `Class.Humanoid`
This method lowers the `Class.Humanoid.Health` of the `Class.Humanoid`
by the given _amount_ if it is not protected by a `Class.ForceField`

This function accepts negative values for the _amount_ parameter. This
This method accepts negative values for the _amount_ parameter. This
will increase the humanoid's `Class.Humanoid.Health`. However this will
only have an effect if no `Class.ForceField` is present.

Expand All @@ -2150,7 +2151,7 @@ methods:
directly.

For more information on how `Class.ForceField|ForceFields` protect
`Class.Humanoid|Humanoids` see the `Class.ForceField` page
`Class.Humanoid|Humanoids` see the `Class.ForceField` page.
code_samples:
- Humanoid-TakeDamage1
parameters:
Expand All @@ -2172,16 +2173,16 @@ methods:
summary: |
Unequips any `Class.Tool` currently equipped by the `Class.Humanoid`.
description: |
This function unequips any `Class.Tool` currently equipped by the
This method unequips any `Class.Tool` currently equipped by the
`Class.Humanoid`

The unequipped `Class.Tool` will be parented to the `Class.Backpack` of
the `Class.Player` associated with the `Class.Humanoid`.

If no `Class.Tool` is equipped, this function will do nothing.
If no `Class.Tool` is equipped, this method will do nothing.

Although `Class.Tool|Tools` can be equipped by NPCs (Non Player
Characters), this function only works on `Class.Humanoid|Humanoids` with a
Characters), this method only works on `Class.Humanoid|Humanoids` with a
corresponding `Class.Player`. This is because a `Class.Backpack` object is
required to parent the unequipped `Class.Tool` to.

Expand Down Expand Up @@ -2215,8 +2216,8 @@ methods:
tags:
- Deprecated
deprecation_message: |
This deprecated function is a variant of `Class.Humanoid:LoadAnimation()`
which should be used instead.
This deprecated method is a variant of `Class.Humanoid:LoadAnimation()`.
`Class.Animator:LoadAnimation()` should be used instead.
security: None
thread_safety: Unsafe
capabilities: []
Expand All @@ -2236,7 +2237,7 @@ methods:
tags:
- Deprecated
deprecation_message: |
This deprecated function is a variant of `Class.Humanoid:TakeDamage()`
This deprecated method is a variant of `Class.Humanoid:TakeDamage()`,
which should be used instead.
security: None
thread_safety: Unsafe
Expand All @@ -2247,17 +2248,17 @@ methods:
Makes the character's look match that of the passed in
`Class.HumanoidDescription`.
description: |
This yielding function makes the character's look match that of the passed
This yielding method makes the character's look match that of the passed
in `Class.HumanoidDescription`. A copy of the passed
`Class.HumanoidDescription` is cached as the `Class.HumanoidDescription`
for the `Class.Humanoid`.

This function is optimized through making the assumption that only this
function is used to change the appearance of the character, and no changes
This method is optimized through making the assumption that only this
method is used to change the appearance of the character, and no changes
are made through other means between calls. If changes are made to the
character between calls. Then this function may not make the character
character between calls, then this method may not make the character
reflect the passed in `Class.HumanoidDescription` accurately. If you want
to use this function in conjunction with other means of updating the
to use this method in conjunction with other means of updating the
character, `Class.Humanoid:ApplyDescriptionReset()` will always ensure the
character reflects the passed in `Class.HumanoidDescription`.

Expand Down Expand Up @@ -2300,12 +2301,12 @@ methods:
Makes the character's look match that of the passed in
`Class.HumanoidDescription`, even after external changes.
description: |
This yielding function makes the character's look match that of the passed
This yielding method makes the character's look match that of the passed
in `Class.HumanoidDescription`, even after external changes. A copy of the
passed `Class.HumanoidDescription` is cached as the
`Class.HumanoidDescription` for the `Class.Humanoid`.

This function will always ensure the character reflects the passed in
This method will always ensure the character reflects the passed in
`Class.HumanoidDescription`, even if changes have been made to the
character not using the `Class.HumanoidDescription` system (for example
not using `Class.Humanoid:ApplyDescriptionReset()|ApplyDescriptionReset()`
Expand Down Expand Up @@ -2341,7 +2342,7 @@ methods:
Plays emotes and returns if was successfully ran.
description: |
If the emote could not be played because the emoteName is not found in the
HumanoidDescription this API will give an error. The API will return true
HumanoidDescription, this method will give an error. The method will return true
to indicate that the emote was played successfully.
code_samples:
parameters:
Expand Down