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…
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
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)