Roblox game crashes for mobile users?

Regarding streaming enabled, the map and builds themselves are not complicated in any way.

And you’ve made sure that the memory isn’t unusually high (above 1000mb)? If it is, what parts of memory are causing it to be so high?

While it may not be high, you mentioned it occurs on low end devices, such as phones and tablets. It will help greatly to any devices as well.

The only negative to streaming enabled is if you want a custom rendering system, which is not common.

1 Like

Ill go ahead and test this and let you know if this works.

I have enabled both streaming enabled and spaced things out on the client and things still dont work…

Try decreasing the streaming radius in Workspace

With your code, we can help you much more than suggesting broad solutions. If you don’t want to give you’re code, that’s fine, but then we can’t help you very well.

If it’s a problem with your code: The above solutions won’t help much.

Its just i’m not sure which script it is, that’s the problem. If I did I would be happy to share it.

We don’t know either; Unless you give us scripts. That’s the barrier here.

If you are trying to figure them out, you can go through and disable the scripts one by one until the issue gets better. That’s the easiest option as of now.

Things that can cause issues like this can include for loops with large amounts of things to iterate through (usually with GetChildren or GetDescendants), a lot of instances being spawned at once (this is not limited to BaseParts), a lot of CFrames being set at once (including SetPrimaryPartCFrame), or just long threads of code in general. One thing that used to cause a similar problem in one of my games was actually part of the player initialization stage, where a ton of values and folders were cloned into the player when loading, not to mention the massive amounts of objects spawned to represent inventories.

So how would I even this out? Spawn a few in every second?

If you’re dealing with less than ~150 objects this probably isn’t the issue, but otherwise I like to wait one frame every 30 or so iterations. By using the index of a for loop you can use this logic to wait once every 30 instances:

if i%30 == 0 then
    wait()
end

Of course you can wait less than this, but waiting once every 100 would probably be a good upper bound.

Well I am cloning 6 tycoon each with over 100 buttons so this may be the case. Should I just clone the 6 tycoons in studio?

If this happens every time a player joins, I guess you could just put a wait() between every time a tycoon spawns.

Well 6 of the tycoons spawn when a server is created.

I took a look around in the micro-profiler and found this? What exactly does this mean? (I have never used the micro-profiler before.)

I looked around and found that apparently its something on roblox’s end, then why did it just start lagging now. They average run about 300ms during the spike which crashes most users. The whole thing lasts 2 seconds for 1 frame.

Does not seem to work I put a wait(2) in between each tycoons creation and it still causes this massive lag spike. When looking into other games their lag spike at the beggining when you load in is about 300ms… why is mine 2000?

Just a quick post, for those who may stumble upon this post and have the same problem.

Make sure you are not using lots of wait()s as this can drag what would be a 2 or 3 second wait up to 20 or 30 seconds on lower end devices.

In my case I was using over 350 total wait()s in my code.

If your not sure what to change your wait()s into there is a great post here which can help you.

Does it mean that not using “wait()” a lot but use like “wait(1)” or “wait(2” please explain more I have trouble from this and my player count dropping

Using wait as a whole is bad, use any wait replacement or use the new task.wait()!