How do i fix performance issues on my mobile devices? Help needed

I am having performance issues on my mobile devices,

I have done a bit of research and found putting some un-used assets in replicated storage can help, However i’m not too sure as i’m setting the parents of assets to replicated storage via a local script so i’m guessing that thus it’s stored on the client…

https://gyazo.com/f285925d938a09d2cc1207c7b4d80921.jpg

https://gyazo.com/c4f0e479d2aa5a46455b7ca6a4539d35.jpeg

Client scripts, The camera script is the default roblox one, Ambience and control is made by me.

A brief summary of what the control does is: The control gets the inputs (inputbegan / changed / ended) and then fires functions in some of the modulescripts, There are a few things going on:

Inputchanged is constantly being fired (when the input is changed)
There’s a while loop in the control script, this should make it so that only one while loop is used across all these modulescripts,
Raycasting happens aswell via viewportpointtoray to get an object.

Is that screenshot from the default F5 play button or is that from a “start server” or published version, because I see that my game typically takes up a gig of ram when I use the default F5 Play button instead of running a server in studio, where it’ll report ~ 500mb

Ah yeah i forgot about that,
https://gyazo.com/11257563edba7079937ff324d5ab748c

Here are the stats but it stilll lags my game on mobile

If possible (and if included in your scripts), try to widen the time between each code execution. For instance, its better to make a 5 second wait time rather than 0.1 as this will result in less server/client usage. (especially for looped scripts)

Also, maybe try implementing Network Streaming into your game (StreamingEnabled)

1 Like

I’ve already tried to widen the time between each code execution (as much as possible), I will look into streaming enabled now, Thank you

Streaming Enabled reduced the lag greatly! Thank you so much, I’m surprised i didn’t know about this feature.

1 Like

I’m glad I could help :pray:
Also make sure you read through how it works, as it may have some downsides. Also consider checking out this page.

1 Like

What sort of performance issues are you seeing?

Your toon shader effect draws everything twice… so if you had low frame rates that might be why?

It was an issue with CPU / RAM, It was taking up memory from the amount of builds,

It’s sorted now however I enabled streaming enabled.

1 Like