Content streaming (StreamingEnabled) does not work at all if the player doesn't have a Character

I’m working on a game that doesn’t have a character and needs to have content streaming (StreamingEnabled = true). However, when I try to do RequestStreamAroundAsync while the player doesn’t have a character (because CharacterAutoLoads is set to false when they join the game), nothing loads at all.

I tried to use ReplicationFocus, but since nothing was loading at all I had nothing to set it to. Creating a local part and setting the ReplicationFocus to that did nothing.

Additionally, when I called RequestStreamAroundAsync with a timeout, the thread yielded for much longer than the timeout I set. when I called it with a timeout of ten seconds, I checked and it actually yielded for about one minute and thirty seconds.

I think this is a bug since the official documentation for content streaming implies that this feature should work without a Player.Character set:

Manually setting the player’s ReplicationFocus should only be done in unique cases like in games that don’t use a Player.Character . In such cases, make sure the focus is near the object(s) that the player controls to ensure content continues to stream around the player’s interaction point.

One workaround I’m using is to create an anchored, invisible, and unkillable character model and setting Player.Character to that when they enter the game. It would be better if I didn’t have to use this hacky workaround to get content streaming working on a characterless game.

7 Likes

A temporary fix could be to reparent models you want to force load to ReplicatedStorage on the server and handle the rest on the client.

1 Like

Parenting things to ReplicatedStorage will still take up memory on the client because it’s still replicated.
A content streaming system like this where you keep models in ServerStorage and hackily stream them to the player through PlayerGui will work for some use cases like Adopt Me or Meep City who both divide their game’s world into segments to be loaded in/out, but it doesn’t exactly fit the purpose of StreamingEnabled when you have one unified, unabridged map like most games do.

2 Likes

It’s just meant as a temporary fix to avoid implementing a custom streaming system over one bug. Also the purpose is to “force replicate” a small scene the player will see upon joining, not to replicate the entire game.

:person_facepalming:, okay so it occurred to me that you have to set ReplicationFocus on the server instead of the client. Doing that on the server worked. Even the official docs say that:

This property should only be set on the server with a Script , not a LocalScript . Note that this property does not change or update network ownership of parts.

I’ll just go ahead and write a feature request that makes it so that attempting to set this property from the client emits a warning.

Feature request:

3 Likes

Closing thread because this is not a bug and author found a solution.