All right, so I’ve left considering whether StreamingEnabled is right for a project I’m working on on the back burner for a bit, but I’ve come to a point where I need to make a decision, and that decision may hinge on a solution to this problem. I have a scenario—I feel like it’d be a pretty common one nowadays.
Scenario:
Suppose there’s a part over off yonder that I want to customize locally. The player isn’t guaranteed to be within streaming distance of this part at any given moment. So, I attempt to customize the part upon the player joining the game, with a :WaitForChild("",timeout) attached. Suppose it times out. Then, I’ve no choice but to connect an event on the client in case that part shows up; however, I’ve also got to connect an event on the server in case that part, or its ancestors, get deleted, so I can disconnect the client connection and avoid a memory leak…
Except what if the part never existed to begin with? Well, we have to make that server connection somehow, and the client is the only one that knows it’s missing something, so a RemoteFunction it is. If the server finds the part, good, make the deletion connections, otherwise, return to the client and have it disconnect its own constant check. Great! But…
We need to connect and disconnect the server connection(s) at the behest of the client… Right. Sounds dangerous. Sounds scary. Sounds like my game will not be consistently playable when the vulnerability is found, and all the memory is eaten up.
Am I missing something? Am I overlooking something? Am I wrong? What’s going on?