[AI Issue] No Traffic is Spawning

This script is what I’m using. If it doesn’t work for you I’m not sure what it could be.

trafficDensity = 0.3
pedDensity = 0.3
Citizen.CreateThread(function()
	while true do
	    SetVehicleDensityMultiplierThisFrame(trafficDensity)
	    SetPedDensityMultiplierThisFrame(pedDensity)
	    SetRandomVehicleDensityMultiplierThisFrame(trafficDensity)
	    SetParkedVehicleDensityMultiplierThisFrame(trafficDensity)
	    SetScenarioPedDensityMultiplierThisFrame(pedDensity, pedDensity)
	    
	Citizen.Wait(0)
	end
end)

Yup, still nothing


It gets this close, but it just despawns, and removes it self.

Then you have a script that is conflicting and causing them to despawn. Try doing a search of your files, search for the following things:

  • ClearAreaOfVehicles()
  • SetVehicleDensityMultiplierThisFrame()

Not a thing.

Hm. Very perculiar. Perhaps a client plugin conflicting?

What do you mean with that?

.asi plugins conflicting. Those can be found in the plugins/ directory.

Nope, i have only lambda.

This isn’t adding up. Have you 100% ensured that in your settings, the traffic density, or so, is set to high or something?

If you want to contact me on discord and we can go ahead and just find out on screenshare

I’m good. I probably won’t be proving support for this as I don’t know what is causing this issue. However if you have no success then you can DM me here on the forums.

You don’t have any of the settings in lambda disabling traffic? Have you tried without lambda?

You can usually see “fake” traffic from a distance. They aren’t real rendered cars, but something the game adds to make it seem more populated.

1 Like

Here i got it finished, so i had a resource named assets, and i had a data folder in it, and in the data folder you could find a meta named Events, i removed it from the __resource.lua and it worked.

where do I stick this? make a server.lua? or can i paste this somewhere

It would go inside a client.lua file.

1 Like

Hey, i’m strugglin with this problem with AI, it’s some kind of dependencies for assets?

No dependencies needed. With FXServer 5971 this not working anymore sadly…