Garry's Mod Wiki

Player:GetObserverTarget

  Entity Player:GetObserverTarget()

Description

Returns the entity the player is currently observing.

Set using Player:SpectateEntity.

Returns

1 Entity
The entity the player is currently spectating, or NULL if the player has no target.