Scripts spawning cars causing alot of lag!

So i have different stages where cars spawns and basically drives over a road then they pretty much falls of the map and gets :Destroyed() but i get alot of lag while playing and my ping gets high but my GPU and CPU is not getting hit. So i guess the lag is on the server side but i really only get a few scripts…

robloxapp-20210809-1450021.wmv (5.1 MB)

This video got recorded in a really low quality for some reason but i hope it works or i will get a higer res video. But any help with lag is appreciated thanks!

1 Like

Either use these cars on the client, or reduce their detail / reduce rate of spawn.
I have not watched the video, so if I am missing something, that’s likely the reason.

Please convert your video to an mp4, (sorry dont want to download any possibly sus files) so that we can view it :slight_smile:

The cars (and ping) seem to be fine from the video you posted. Though, you may want to have a RemoteEvent that tells the client to spawn cars and let the client handle the cars instead. This will (most likely) solve the ping issue.

I guess i could make it on the client but then it wont be synced with other players and it will seem pretty weird… but i will try and see if the lag reduces

It’ll only seem weird if the cars are meant to be a part of the experience physically.
If they are there just for show, by all means use them locally.

haha yeah but the meaning is for you to dodge the cars lol

Late response, but in that case you may want to try and use one car over and over instead of localizing everything.
You could probably still get away with localizing it though.

Thanks for the help but it seems to be to hard to get this working i think i scrap the idea lol, i tried with a truck built by 1 mesh part and it still lagged and its not that many cars but i guess its to much for roblox to handle so i will move on with a more simple idea haha