Make specific parts loaded where StreamingEnabled hasn't

Hey everyone,
I know the title is confusing, so let me explain. I currently have a script that needs all linked, or parts listed in the script to be loaded.

Lag is a huge issue in my game, so using Steaming helps fix that. The issue is that when I have StreamingEnabled, obviously, some parts haven’t loaded yet.

I want the parts in my script to stay in the workspace at all times even when the specific area hasn’t loaded with Streaming.

Any ideas to make this possible?
(This is my first post, so please let me know if I should change anything. :happy3:)

1 Like

Group them into a Model and set its ModelStreamingMode to Enum.ModelStreamingMode.Persistent.

1 Like

Will try! Does this fix happen to work with folders too, or just models?

Only Models have the ModelStreamingMode property. To ensure the part is always streamed it must be a descendant of a model with Persistent streaming.

1 Like

Thanks for the help! One last question as I’m still fairy new to Roblox Studio, would the option to set the model’s Streaming Mode to persistent be in the ‘properties’ tab, or would I have to type it into a script?

1 Like

Either is available for you to use. (if setting from a script, only set it from a Script - a LocalScript or Script with Client RunContext will result in the ominous “Undefined Behaviour” (UB), only the gods will know what could happen.).

Manually setting without a script:

  • Select the Model in the Explorer
  • Open the Properties tab
  • Under Behaviour, select the ModelStreamingMode and select the Persistent option in the dropdown menu.

Setting within a Script (Sample Code):

Model.ModelStreamingMode = Enum.ModelStreamingMode.Persistent
1 Like

Thank you so much for the help! Appreciated! :blush:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.