I’ve spent says trying to figure out what the code is that is causing all the lag players are experiencing in our game. I cannot find the cause, therefore I am looking for help on this platform.
could you share the game link?
And maybe the micro profiler can give you more information.
Many things can cause lag. There is no way to pick out the problem with the information given.
If I had to guess (and I do)… Unknowen is off the scale having a problem. I’m sure that script is a builtin Roblox script for whatever… This one may come down to waiting for Roblox to address it. You yourself have no control over this script … post it in bugs.
I don’t really know … But, this may be a sub script you’re running in the background.
Guess you would need to find out for sure what Unknown is…
Haven’t received a answer yet.
Does anyone know how we can possibly get the cause of the lag?
Are you sure it’s causing lag? High rates don’t = lag half the time & sometimes it can show incorrect values. It also may be a core roblox script which is why it says unknown OR developer console is not showing it properly.
You should try to see if it shows what it is in studio (or in-game if that screenshot is in studio) and see if it shows there.
If it’s a big deal, sadly, I think (someone please correct me if this is wrong) the only thing you can do is to manually disable each script and find out what it is.
It is not having a high activity as it does in-game.
Did you try to find out which script(s) doesn’t show on the console and disabled each one to see what is the unknown script?
Basically everything is on it, and if they’re not. They are like small codes that aren’t even used as much.
If you’ve used any free models In the game then it might be that it injected a script onto the game (unlikely but possible)
For me in console I don’t have that unknown script so I don’t think it’s a core roblox script either. Good luck because I’m also stumped xD
I did some more digging and if you have done Instance.new() & haven’t unanchored the part it will come up as “[Unknown]” and have a high rate
Source: 'Unknown' script running on my game + weird lag spikes
It can also be a plugin or again, a virus.
Make use of the MicroProfiler, it can be found in settings when pausing your game. (I recommend dumping the results and using the HTML file) look at frames with high frame time and go up or down to look for threads that take a long time to finish.
In addition you can use debug.profilebegin(“title”) and debug.profileend() to add your own bars and measure how long they take to complete