# Removing vanilla props and objects from the FiveM map

> Remove unwanted GTA 5 objects in FiveM: CreateModelHide for a model at a location, deleting dynamic objects, editing ymaps in CodeWalker, and the trade-offs.

Source: https://fam-tools.com/guides/fivem-remove-map-props · FAM Tools · published 2026-09-11 · updated 2026-09-11 · about 10 min

**Short answer.** For a few specific objects, hide the model at a location from a client script with `CreateModelHide(x, y, z, radius, modelHash, true)`. For larger edits, remove the entities from the vanilla .ymap in CodeWalker and stream the edited file — accepting that any other resource editing the same ymap will conflict. Dynamic objects can simply be deleted when found.

## Key points

- `CreateModelHide` hides one model inside a radius — no map files touched.
- Editing a vanilla ymap is powerful but conflicts with other edits of the same file.
- Dynamic props (bins, cones) can be found and deleted like any entity.
- Collision goes with the model when hidden; invisible walls mean something else is still there.
- Keep hides in one resource so you know where they live.

Sooner or later every server needs to remove something from the base map: a lamp post in front of a custom garage door, a fence that blocks an MLO entrance, a wall where a new driveway goes. There is no “delete” button for the vanilla world — but there are two reliable techniques, and choosing the right one decides whether your change survives the next map pack you install.

## Method 1: CreateModelHide

*client.lua*

```lua
local HIDES = {
    -- x, y, z, radius, model
    { vector3(215.0, -810.0, 30.7), 3.0, `prop_streetlight_01` },
    { vector3(-560.2, -210.8, 37.6), 5.0, `prop_fnclink_02gate1` },
}

CreateThread(function()
    for _, h in ipairs(HIDES) do
        CreateModelHide(h[1].x, h[1].y, h[1].z, h[2], h[3], true)
    end
end)

AddEventHandler('onResourceStop', function(res)
    if res ~= GetCurrentResourceName() then return end
    for _, h in ipairs(HIDES) do
        RemoveModelHide(h[1].x, h[1].y, h[1].z, h[2], h[3], false)
    end
end)
```

- Every instance of that model inside the radius is hidden, including its collision.
- Keep the radius tight so you do not hide the same model elsewhere nearby.
- Find the model name by aiming at the object with a developer tool or in CodeWalker.
- `CreateModelHideExcludingScriptObjects` hides only map-placed copies, leaving copies spawned by scripts.

## Method 2: editing the vanilla ymap

Every vanilla object is an entity in some .ymap. In CodeWalker you can open that ymap, delete the entity and save an edited copy, which your resource then streams in place of the original. This removes the object at the source, with no script running.

> **The conflict problem** — Only one version of a given ymap can win. If an MLO or map pack also ships an edited copy of the same vanilla ymap, one of the two edits disappears. Before editing a ymap, search your resources for another file with the same name.

The CodeWalker side, step by step, is in [CodeWalker map editing](https://fam-tools.com/guides/codewalker-map-editing).

## Dynamic objects

Some props are dynamic — bins, cones, chairs the game spawns as physical objects. These can be found and deleted from a client script:

*client.lua*

```lua
local function deleteNearby(model, coords, radius)
    local obj = GetClosestObjectOfType(coords.x, coords.y, coords.z, radius, model, false, false, false)
    if obj ~= 0 then
        SetEntityAsMissionEntity(obj, true, true)
        DeleteObject(obj)
    end
end
```

Dynamic objects can respawn as the area reloads, so deletion is typically run when the player enters the area; for permanent removal a model hide is simpler.

## Which method to use

| Situation | Use |
| --- | --- |
| A few objects blocking an MLO or garage | `CreateModelHide` |
| Clearing a large area for a new build | Edited ymap (check for conflicts) |
| Loose bins, cones and chairs | Delete dynamic objects |
| Something you only want gone for one event | A temporary model hide, removed afterwards |

## Questions

### How do I remove an object from the GTA V map in FiveM?

Use `CreateModelHide(x, y, z, radius, modelHash, true)` in a client script to hide that model around a position, or remove the entity from the vanilla ymap in CodeWalker.

### Does CreateModelHide remove collision too?

Yes, the hidden model’s collision goes with it.

### Why did my removed object come back?

Another resource streams a different version of the same ymap, or the object is dynamic and respawned. Check for conflicting ymaps.

### How do I find a prop’s model name?

Look it up in CodeWalker by clicking the object, or use a developer tool that shows the entity you are aiming at.

## Related

- https://fam-tools.com/guides/fivem-ymap-guide
- https://fam-tools.com/guides/codewalker-map-editing
- https://fam-tools.com/guides/fivem-mlo-install
- https://fam-tools.com/guides/fivem-custom-props
