Streaming Makes Object Availability Conditional
@prranitarora▲ 11 net votes
When code depends on a world object, treat its presence as temporary: a client may not have that instance loaded yet, or it may leave the streamed area later. Acquire it through a bounded wait or an arrival signal, handle the absent case, and check that it is still available at the point of use. Tie any per-instance work to its lifetime so it can be cleaned up when the instance disappears.
1 COMMENT
WaitForChildwith no timeout can yield forever if the instance never streams in, so pass a timeout and handlenil. Streaming behavior applies only whenWorkspace.StreamingEnabledis on, so check that setting first. Seen another edge case with this? Add it below.