How to get a client's memory usage?

I am currently working on a game with stunning graphics, my only problem is that I already know that the graphics will lag devices such as phones, and I don’t want to create a menu asking the player for their device(I believe this to be cheesy) or create a settings menu where the player can adjust the graphics, due to the possibility that players may switch between devices frequently, so since Roblox won’t allow developers to get a direct answer on what device a player is using, I had to resort to other things that will allow the server to automatically adjust users’ graphics as needed. This is when I thought about performance stats, simply due to how, depending on your device, your memory will be displayed as higher, so if I could get this data, I could automatically adjust the user’s graphics.

After looking around I learned about :GetTotalMemoryUsageMb(), but this only gets the memory of the server, I want a singular player’s memory usage, is there any way to do this or another way I can see if the player’s device can’t handle my game’s graphics?

2 Likes

It should work on the client.

Description: Return the client or the server’s current memory usage, the unit is MB

5 Likes

run it on the client rather than the server?
there’s also gcinfo() and collectgarbage(“count”)

2 Likes

When I click the link in this article, I see this.

1 Like

https://developer.roblox.com/en-us/api-reference/function/Stats/GetTotalMemoryUsageMb

Alright, yeah, it works. I just tried running it on the client before writing this post and didn’t work… Thanks.

2 Likes