# getCameraTarget (Client)

> Returns the player or ped the camera is following.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Client
- **Category**: Camera
- **URL**: https://wiki.mymp.gg/en/getCameraTarget

## Syntax

```lua
element|false getCameraTarget()
```

## Returns

The player or ped, or `false` if the camera is fixed or attached to an element.

## Example

```lua
if getCameraTarget() ~= localPlayer then
    setCameraTarget(localPlayer)
end
```

## See also

- [setCameraTarget (Client)](https://wiki.mymp.gg/en/setCameraTarget.md): Makes the camera follow a player or ped, as in normal play. It also undoes setCameraMatrix and attachCameraToElement.
