# isElementLocal (Client)

> Tells whether an element was created by this client rather than by the server.

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

## Syntax

```lua
bool isElementLocal(element element)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `element` | `element` | The element. |

## Returns

`true` if the element belongs to this client, `false` if it came from the server.

## Example

```lua
for _, object in ipairs(getElementsByType("object")) do
    if isElementLocal(object) then
        destroyElement(object)
    end
end
```

## See also

- [createElement (Shared)](https://wiki.mymp.gg/en/createElement.md): Creates an element of a type the script makes up, with nothing in the world. It goes under the resource's dynamic element root.
- [isElement (Shared)](https://wiki.mymp.gg/en/isElement.md): Tells whether a value is an element that still exists.
- [destroyElement (Shared)](https://wiki.mymp.gg/en/destroyElement.md): Destroys an element and all of its children. Before it goes, each one fires onElementDestroy on the server or onClientElementDestroy on the client.
