StreamingEnabled problem when camera is not on character

I have been trying to apply StreamingEnabled into my game, which there is a map and a lobby that are thousand studs away. Without StreamingEnabled, the lobby gets rendered even when the player is in the map, even if it is not visible to the player.

In my game, there is a menu screen that focuses between the Map and the Lobby. The character does not exists while the player is in menu.

Here is my StreamingEnabled settings:
image

The problem I am facing with StreamingEnabled is when the player is at menu, the map does not render if the player was at lobby before returning to the menu. Even if I use RequestStreamAroundAsync(currentCamera.CFrame.Position) when the camera subject / type changes, the map only gets partially rendered, then it gets unrendered after few seconds.

I would not prefer hack ways such as constantly calling RequestStreamAroundAsync while the player is at the menu or “place the character behind the camera when player is at menu.”

Is there any way to make StreamingEnabled more dependent on the camera when the character does not exists? Or I should write my own “Streaming” method that caters the Lobby specifically?

According to a Roblox engineer, you can.

1 Like

From what I have heard, this becomes invalid and no longer works after some updates from Roblox. First, the ReplicationFocus can only be set on server. Second, you are unable to set ReplicationFocus to CurrentCamera as it can only be set to a Model.

You can make it work without a Camera by faking it with a Model on the server.

local function createStreamingCamera(player: Player, initialCF: CFrame)
	local model = Instance.new("Model")
	model.Name = player.UserId.. " [Camera]"
	model:PivotTo(initialCF)
	model.Parent = Workspace
	
	player.ReplicationFocus = model
	
	return model
end

I also attached a working example: StreamingCamera.rbxl (55.1 KB)