Changes to PartInstance Streaming with Streaming Enabled

Hi!

We make a vehicleseat on the server, and sit people down on it. By doing this without a wait() between these steps, the player is seated in the new camera mode. When I add task.wait(.011) it uses the old camera mode.

I reported earlier on release of the new vehicleseat camera, that seating players locally triggers the new camera, but seating players from the server does not. It appears that the delay causes the seating to be done ‘locally’, probably because the seat is not streamed yet at the moment of seating the player.

This took me quite long to find and fix. It seems to have also caused a bug when sitting down in first person, zooming out, and getting up, which is fixed by the same workaround. However, after the hotfix (adding wait(0.011)), sitting down in first person mode warps the camera to third-person view (I’m not 100% this is not a side effect of one of my own scripts, but I don’t think this happened before). By setting the localPlr.CameraMinZoomDistance manually to 0 after seating, this magically fixes it.

I was quite lost on this problem, but I think we solved it. I just cannot guarantuee that it works for all devices and connections, since I tested with a low ping and fast device. But waiting on the server for something to stream to the client, and only then seating on the server, may cause ‘race conditions’ effects where the wait() is not long enough. I am also not a big fan of such a wait(.011) statement, but unsure how to properly wait for the part being streamed to the client…

Any further advice is very welcome, or please take note of this side effect. It would in fact be nice for us to be able to trigger the new vehicleseat camera while server-side seating - we were not able to accomodate local seating in the context of our experience.

Thanks for continuing improvements to streaming enabled, Snow Resort makes very good use of streaming! Dealing with partially streamed mechanisms was doable when very careful, but indeed quite challenging at times. :slight_smile:

1 Like