Very laggy game/game crashes

Hey! I started making a game, I have already done a lot. but now when i try to sit or get in an elevator (teleports) the game laggs for everyone. It also laggs if i sit in a chair or just simply load in to the game. I’ve already tried a few things but am hopeless now. (see video for more info)

Thank you for helping!

1 Like

Do you have any scripts that run when you sit? Something has lagged your game that is affected by that action.

we only have a seat with nothing there and it mysteriously freezes

Have you used any items from the toolbox?
Sometimes they have scripts in them you don’t know about and affect your game in strange ways.
Search your Explorer window for scripts to see if something’s been put into your build.

We haven’t imported any models so that’s clear and there’s no scripts that are labelled infected, if we did we would also need to rummage through 200+ scripts

Scripts aren’t usually labelled ‘infected’ if you get them from plugins or toolbox items.
If you have many people working on the place then maybe one of them are using a plugin that causes the infection.
It’s usually tough to find after it’s been infected because if someone created a script to cause this issue then they would have found some way to hide it inside another script or another way.
Who wrote the 200+ scripts in the game?

Most of our scripts come form the developers in our game and occasionally some from YouTube and the toolbox but those are all checked for infections and viruses.

Do you get anything in the Output window when this happens?

, weirdly enough in studio test everything works fine and there is no crashes.

Some backdoored plugins can add malicious lines of code to existing scripts. Try using the global script search widget to see if anything is loading in an unauthorized model or script when the game starts. That’s my only guess.

Try grouping everything in the game into one model. Sometimes that works for me

This could also be it.

i dont know exactly how to do a global search, could you lead me through the steps?

Ctrl+Shift+F is what I press for the widget.

What is the part count of the build?

83508 partsdsqdqsqq

83 thousand parts, that’s why it’s laggy.

How would we reduce that number to make it less laggy also avoiding meshes? - note we only have 1/2 of the map done

What is this map? If you’re going to have 160 thousand parts, it has to be huge.

we are making a railway network with scenery and trains