From 1e0d9e47354704fea2589a5b59151658ec06843a Mon Sep 17 00:00:00 2001 From: Ruanito <138895465+Ruanitoo@users.noreply.github.com> Date: Tue, 28 Jan 2025 03:38:57 -0300 Subject: [PATCH 1/6] Update Humanoid.yaml Updates the ChangeState method description, in order to let the users know that It only works on the NetworkOwner of the character side (If the NetworkOwner is a player, It must be done using a localscript owned by that player. If it's server, must be done in a server script --- content/en-us/reference/engine/classes/Humanoid.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/content/en-us/reference/engine/classes/Humanoid.yaml b/content/en-us/reference/engine/classes/Humanoid.yaml index 6d2733970..d2cccdb5e 100644 --- a/content/en-us/reference/engine/classes/Humanoid.yaml +++ b/content/en-us/reference/engine/classes/Humanoid.yaml @@ -1438,6 +1438,11 @@ 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.Character`. You can use this function in a `Class.Script`, but the NetworkOwner + of the `Class.Chatacter` must be the Server. + See also `Class.Humanoid:SetStateEnabled()` to enable or disable a particular state, and `Class.Humanoid:GetState()` to get the current humanoid state. From c10cf54b31997f92259633fa6a094a5e00c9767d Mon Sep 17 00:00:00 2001 From: Ruanito <138895465+Ruanitoo@users.noreply.github.com> Date: Tue, 28 Jan 2025 03:45:27 -0300 Subject: [PATCH 2/6] Update Humanoid.yaml (FIX) Updates the ChangeState method description, in order to let the users know that It only works on the NetworkOwner of the character side (If the NetworkOwner is a player, It must be done using a localscript owned by that player. If it's server, must be done in a server script --- content/en-us/reference/engine/classes/Humanoid.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en-us/reference/engine/classes/Humanoid.yaml b/content/en-us/reference/engine/classes/Humanoid.yaml index d2cccdb5e..c307f649b 100644 --- a/content/en-us/reference/engine/classes/Humanoid.yaml +++ b/content/en-us/reference/engine/classes/Humanoid.yaml @@ -1441,7 +1441,7 @@ methods: 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.Character`. You can use this function in a `Class.Script`, but the NetworkOwner - of the `Class.Chatacter` must be the Server. + of the `Class.Character` must be the Server. See also `Class.Humanoid:SetStateEnabled()` to enable or disable a particular state, and `Class.Humanoid:GetState()` to get the current From e92aad1240ba4b11bbaa8ae45dff4186c624a1bb Mon Sep 17 00:00:00 2001 From: Ruanito <138895465+Ruanitoo@users.noreply.github.com> Date: Tue, 28 Jan 2025 03:49:14 -0300 Subject: [PATCH 3/6] Update Humanoid.yaml (ALL FIXED) Updates the ChangeState method description, in order to let the users know that It only works on the NetworkOwner of the character side (If the NetworkOwner is a player, It must be done using a localscript owned by that player. If it's server, must be done in a server script --- content/en-us/reference/engine/classes/Humanoid.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/en-us/reference/engine/classes/Humanoid.yaml b/content/en-us/reference/engine/classes/Humanoid.yaml index c307f649b..908bfb69a 100644 --- a/content/en-us/reference/engine/classes/Humanoid.yaml +++ b/content/en-us/reference/engine/classes/Humanoid.yaml @@ -1440,8 +1440,8 @@ methods: 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.Character`. You can use this function in a `Class.Script`, but the NetworkOwner - of the `Class.Character` must be the Server. + `Class.Player.Character`. You can use this function in a `Class.Script`, but the NetworkOwner + of the `Class.Player.Character` must be the Server. See also `Class.Humanoid:SetStateEnabled()` to enable or disable a particular state, and `Class.Humanoid:GetState()` to get the current From 866d8df00da78d8db5105bc58b05bdf89ead1d67 Mon Sep 17 00:00:00 2001 From: Ruanito <138895465+Ruanitoo@users.noreply.github.com> Date: Thu, 30 Jan 2025 01:49:36 -0300 Subject: [PATCH 4/6] Small Writing Changes Humanoid.yaml I made some writing changes to the Humanoid page. I know that the ChangeState() method has a long description, but I believe it is easier for beginners to understand. --- .../reference/engine/classes/Humanoid.yaml | 119 +++++++++--------- 1 file changed, 61 insertions(+), 58 deletions(-) diff --git a/content/en-us/reference/engine/classes/Humanoid.yaml b/content/en-us/reference/engine/classes/Humanoid.yaml index 908bfb69a..ab59b95ae 100644 --- a/content/en-us/reference/engine/classes/Humanoid.yaml +++ b/content/en-us/reference/engine/classes/Humanoid.yaml @@ -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. @@ -1438,11 +1438,14 @@ 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 the + [Network Ownership](../../../physics/network-ownership.md) of the + `Class.Player.Character`. + Alternatively, you can call this method from a `Class.Script`, but the + Server must have the [Network Ownership](../../../physics/network-ownership.md) of + the `Class.Player.Character`. + See also `Class.Humanoid:SetStateEnabled()` to enable or disable a particular state, and `Class.Humanoid:GetState()` to get the current humanoid state. @@ -1467,7 +1470,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'_. @@ -1488,13 +1491,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: @@ -1520,7 +1523,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. @@ -1548,10 +1551,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 @@ -1576,13 +1579,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()`. @@ -1592,7 +1595,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: @@ -1618,7 +1621,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 @@ -1671,12 +1674,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. @@ -1697,7 +1700,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. @@ -1722,7 +1725,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. @@ -1760,7 +1763,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: [] @@ -1781,7 +1784,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: @@ -1806,7 +1809,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 @@ -1831,7 +1834,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: @@ -1857,10 +1860,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 @@ -1871,14 +1874,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. @@ -1914,7 +1917,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. @@ -1975,11 +1978,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. @@ -2003,7 +2006,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: @@ -2028,7 +2031,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: @@ -2056,10 +2059,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. @@ -2090,7 +2093,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 @@ -2126,10 +2129,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. @@ -2147,7 +2150,7 @@ methods: To do damage to a `Class.Humanoid` irrespective of any `Class.ForceField|ForceFields` present, set `Class.Humanoid.Health` - directly. + directly using `Humanoid.Health = AMOUNT`. For more information on how `Class.ForceField|ForceFields` protect `Class.Humanoid|Humanoids` see the `Class.ForceField` page @@ -2172,16 +2175,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. @@ -2215,8 +2218,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: [] @@ -2236,7 +2239,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 @@ -2247,17 +2250,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`. @@ -2300,12 +2303,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()` @@ -2341,7 +2344,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: From 7fffeab4278782b5e7fa0d17c8faa1575e7cf3d2 Mon Sep 17 00:00:00 2001 From: Ruanito <138895465+Ruanitoo@users.noreply.github.com> Date: Thu, 30 Jan 2025 06:36:00 -0300 Subject: [PATCH 5/6] Update Humanoid.yaml --- content/en-us/reference/engine/classes/Humanoid.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/en-us/reference/engine/classes/Humanoid.yaml b/content/en-us/reference/engine/classes/Humanoid.yaml index ab59b95ae..5a02231aa 100644 --- a/content/en-us/reference/engine/classes/Humanoid.yaml +++ b/content/en-us/reference/engine/classes/Humanoid.yaml @@ -2150,10 +2150,10 @@ methods: To do damage to a `Class.Humanoid` irrespective of any `Class.ForceField|ForceFields` present, set `Class.Humanoid.Health` - directly using `Humanoid.Health = AMOUNT`. + 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: From e1507667b462e7eca0b9ac9b95f873de6682d81c Mon Sep 17 00:00:00 2001 From: IgnisRBX <43388550+IgnisRBX@users.noreply.github.com> Date: Thu, 30 Jan 2025 12:59:52 -1000 Subject: [PATCH 6/6] Update content/en-us/reference/engine/classes/Humanoid.yaml --- content/en-us/reference/engine/classes/Humanoid.yaml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/content/en-us/reference/engine/classes/Humanoid.yaml b/content/en-us/reference/engine/classes/Humanoid.yaml index 5a02231aa..dfd31d157 100644 --- a/content/en-us/reference/engine/classes/Humanoid.yaml +++ b/content/en-us/reference/engine/classes/Humanoid.yaml @@ -1439,12 +1439,10 @@ methods: to be automatically set to `Enum.HumanoidStateType.Running`. 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 the - [Network Ownership](../../../physics/network-ownership.md) of the - `Class.Player.Character`. - Alternatively, you can call this method from a `Class.Script`, but the - Server must have the [Network Ownership](../../../physics/network-ownership.md) of - the `Class.Player.Character`. + 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