Removing vanilla props and objects from the FiveM map
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.
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.

#Method 1: CreateModelHide
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.
CreateModelHideExcludingScriptObjectshides 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 CodeWalker side, step by step, is in 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:
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
endDynamic 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?
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?
Why did my removed object come back?
How do I find a prop’s model name?
Ready to pick a map?
Twelve themes on three base map styles, $8 each, instant download.