ModelStreamingMode properties for non-streaming games

Having the ability to set models to Atomic or Persistent is very valuable as a dev to help make guarantees as to what has been replicated to the player, however it is unavailable when streaming is disabled and we could very much use that to avoid writing clunky code.

Since we cannot make guarantees that the replicated model the client sees will have the children ready in the same frame, we are forced in situations where we must wait for all the children we expect.

local function ModelAddedFromServer(Model: Model)
 local Part1 = Model:WaitForChild("Part1")
 local Part2 = Model:WaitForChild("Part2")
 local Part3 = Model:WaitForChild("Part3")
 etc...
end

And what makes it even more problematic is that if you are in a situation where the model could potentially be unloaded your code will have to look something like this:

local function ModelAddedFromServer(Model: Model)
 local Part1 = Model:WaitForChild("Part1")
 if not Model.Parent then return end
 
 local Part2 = Model:WaitForChild("Part2")
 if not Model.Parent then return end

 local Part3 = Model:WaitForChild("Part3")
 if not Model.Parent then return end
 etc...
end

And this is also under the assumption we know in advance what we’re looking for, if we have a situation where we don’t know the children in advance and we need to iterate all the model’s children, there’s no easy solution there.

To simplify it, having the Atomic/Persistent properties also apply to non-streaming games would very much solve this annoying complication that is both very easy to overlook and very annoying to account for.

5 Likes