@quenty/humanoidutils 2.2.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.2.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/humanoidutils@2.2.0...@quenty/humanoidutils@2.2.1) (2025-03-21)
7
+
8
+ **Note:** Version bump only for package @quenty/humanoidutils
9
+
10
+
11
+
12
+
13
+
6
14
  # [2.2.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/humanoidutils@2.1.0...@quenty/humanoidutils@2.2.0) (2024-05-09)
7
15
 
8
16
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/humanoidutils",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "General humanoid utility code.",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -27,5 +27,5 @@
27
27
  "publishConfig": {
28
28
  "access": "public"
29
29
  },
30
- "gitHead": "3fd5cdca3128bf34c8d9dfae1e92d62533b6e6f5"
30
+ "gitHead": "6b7c3e15e60cdb185986207b574e2b5591261e7a"
31
31
  }
@@ -1,5 +1,6 @@
1
1
  --[=[
2
- General humanoid utility code.
2
+ Utility methods to work with Roblox humanoids.
3
+
3
4
  @class HumanoidUtils
4
5
  ]=]
5
6
 
@@ -8,9 +9,10 @@ local HumanoidUtils = {}
8
9
  --[=[
9
10
  Retrieves a humanoid from a descendant.
10
11
  @param descendant Instance -- Child of a humanoid model, like a limb
12
+
11
13
  @return Humanoid?
12
14
  ]=]
13
- function HumanoidUtils.getHumanoid(descendant)
15
+ function HumanoidUtils.getHumanoid(descendant: Instance): Humanoid?
14
16
  local character = descendant
15
17
  while character do
16
18
  local humanoid = character:FindFirstChildOfClass("Humanoid")
@@ -29,16 +31,18 @@ end
29
31
 
30
32
  @param humanoid Humanoid
31
33
  ]=]
32
- function HumanoidUtils.forceUnseatHumanoid(humanoid)
33
- if humanoid.SeatPart then
34
- local weld = humanoid.SeatPart:FindFirstChild("SeatWeld")
34
+ function HumanoidUtils.forceUnseatHumanoid(humanoid: Humanoid)
35
+ local seatPart = humanoid.SeatPart
36
+ if seatPart ~= nil then
37
+ local weld = seatPart:FindFirstChild("SeatWeld")
35
38
  if weld then
36
39
  weld:Destroy()
37
40
  end
38
41
 
39
- humanoid.SeatPart:Sit(nil)
42
+ seatPart:Sit(nil)
40
43
  end
44
+
41
45
  humanoid.Sit = false
42
46
  end
43
47
 
44
- return HumanoidUtils
48
+ return HumanoidUtils