Unloading less important details for client

Right so I’m trying to make a function for low-end devices to hide less important details in my game and improve game experience.

I’ve thought of using a local script to parent it to workspace and server storage, however local scripts cannot read or write to server storage so that’s a problem.
A server script would not solve my problem either as I want each client to decide whether to load these details or not.

Changing server storage to replicated storage would pretty much render the whole thing useless as the purpose of hiding these details is to unload them and make the game smoother. Afaik replicated storage doesn’t unload them.

Any ideas to solve this issue would be much appreciated. I don’t know if remote events would help in this case and I haven’t given it much thought.

I think either a button for low performace devices, or SavedQualityLevel may be the best option.

UserSettings():GetService("UserGameSettings").SavedQualityLevel

I’ve got a button on a ui for clients to load/unload these details.
The issue is that my theory would involve a local script parenting these details to workspace and server storage which would unload these details. Apparently local scripts can’t read or write from server storage

If you delete something from the client it only effects the client. Same thing if you clone an object. So moving objects to storage from a local script will only do that for the client. You just need to move it out of workspace really.

Though you could consider using streaming enabled.

If you mean to completely remove it from memory on the client I don’t think that’s possible. The point of moving it would purely be to remove it from rendering and physics calculations.

Maybe try using RemoveEvents then.

Maybe place the folder of the objects you want to be optional in ReplicatedStorage, then copy it to workspace but only make the folder local.

1 Like

I’ve heard that putting stuff in ReplicatedStorage wouldn’t “unload” them, or am I wrong?

They need to be downloaded on server start but only then. Later it won’t unload., but as long as the folder doesn’t contain a lot of objects, you should be fine.

My purpose is to load/unload for only the client, not the whole server as this would affect all players.

My game is currently on streaming enabled and I don’t think that is exactly relevant to what I’m trying to do

It wouldn’t unload because that refers to releasing them from memory (which would require a redownload of the asset to use it again). It will however remove it from certain calculations like rendering and physics.

3 Likes

I see. So will putting stuff in replicated storage still improve game experience?

If there are any alternatives to server/replicated storage that would solve my issue and would work with a local script I would be happy with it as well

See this: ReplicatedStorage.
“This service behaves similarly to ServerStorage except that its contents are replicated. If you are storing assets which should not be visible on the client or have no use to the client at all, you should use that service instead.”

1 Like

Potentially. It really depends on what and how much you are putting in there. Might be negligible if it’s only a couple details. I would move it to replicated if you are writing it yourself, but you can consider streaming enabled which will probably be more effective. Some people don’t like it however because of lack of control of what gets moved as well as the fact that it can break scripts if you are not careful. But it can be very useful.

edit: I totally missed where op stated that they are using streaming enabled. It’s worth noting that unless you plan on removing as much or more than streaming enabled would, you likely won’t see nearly as much benefit as streaming will give you. Could still be worth it though.

1 Like

But they said that StreamingEnabled is not what they want. It unloads far away objects, and doesn’t manage if specific parts and models can be visible or not.

1 Like

Will try working with replicated storage and I’ll ask for help again if it doesn’t work. Thanks!