Skip to content

Commit 6c80613

Browse files
committed
feat: Add RxPlayerUtils.observeLocalPlayerHumanoidBrio():
1 parent 1a1a239 commit 6c80613

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/playerutils/src/Shared/RxPlayerUtils.lua

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,17 @@ function RxPlayerUtils.observeLocalPlayerBrio(): Observable.Observable<Brio.Brio
8787
end)
8888
end
8989

90+
--[=[
91+
Observes the current local player's humanoid
92+
]=]
93+
function RxPlayerUtils.observeLocalPlayerHumanoidBrio(): Observable.Observable<Brio.Brio<Player>>
94+
return RxPlayerUtils.observeLocalPlayerBrio():Pipe({
95+
RxBrioUtils.switchMapBrio(function(player)
96+
return RxCharacterUtils.observeLastHumanoidBrio(player)
97+
end) :: any,
98+
}) :: any
99+
end
100+
90101
--[=[
91102
Observe players as they're added, and as they are.
92103
@param predicate ((Player) -> boolean)?

0 commit comments

Comments
 (0)