RaycastResult.getCharacter

Returns the Character hit during the raycast. This is only possible if RaycastResult.type is equal to "character", otherwise this will return nil.

Kind: Function

Environments: Game

Game

raycastResult:getCharacter(  )

Open the full Game reference

Parameters:

Name Type Description
raycastResult RaycastResult The raycast result.

Returns:

Type Description
Character The character target.