add typed character to PlayerCharacter component

This commit is contained in:
Reid 2023-07-19 00:49:57 -07:00
parent 5302ecc6cc
commit 31559be3b8
4 changed files with 26 additions and 1 deletions

View file

@ -1,6 +1,7 @@
import { Players } from "@rbxts/services"
import { World, useEvent } from "@rbxts/matter"
import { Health, Model, PlayerCharacter } from "ReplicatedStorage/ecs/components"
import { CharacterRigR6 } from "@rbxts/character-promise"
/**
* @todo
@ -13,6 +14,7 @@ function playersArePlayerCharacters(world: World): void {
model: character
}),
PlayerCharacter({
character: character as CharacterRigR6,
player: Players.GetPlayerFromCharacter(character) as Player,
humanoid: character.WaitForChild("Humanoid") as Humanoid
}),