Summary
We started this chapter by learning about StreamingEnabled. We learned that StreamingEnabled is not enabled by default as it changes the way loading in your game works. Normally, when a player joins a game, everything is loaded instantly. However, we learned that only certain instances get sent when the player is joining with StreamingEnabled. Even after the joining process, there is a high chance not everything is loaded on the map. This had to do with the StreamingMinRadius property and the StreamingTargetRadius property.
Besides the behavior that changes when using StreamingEnabled, we also learned that we have to change our local scripts to be compatible with StreamingEnabled. For example, we learned that we need to use the :WaitForChild()
function to reference instances in the Workspace service. Sometimes, we cannot rely on the :WaitForChild()
function because a part might not be loaded unless we are near it. In this scenario, we learned how to use the .ChildAdded
event...