# isElement (Shared)

> Tells whether a value is an element that still exists.

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

## Syntax

```lua
bool isElement(any value)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `value` | `any` | Any value. It raises no error if it is not an element. |

## Returns

`true` if it is an existing element, `false` for any other value or for an element already destroyed.

## Example

```lua
local blip = createElement("checkpoint")

setTimer(function()
    if isElement(blip) then
        destroyElement(blip)
    end
end, 5000, 1)
```

## See also

- [getElementType (Shared)](https://wiki.mymp.gg/en/getElementType.md): Reads an element's type, such as "player", "vehicle" or the type given to createElement.
- [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.
- [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.
