So I have these spinning doors which rotate to open and close pathways. One door rotates at a 180 degree offset to the other. However, I’ve found that I can phase through the door with the offset. Collisions completely break with it despite CanCollide being set to true; touch events don’t even work. The collisions only seem to break with the offset applied. The bug/anomaly only occurs in the studio client, I’ve discovered; it seems to work fine in the player client.
I’ve set up a test place so you can try for yourself: test.rbxl (70.5 KB)
On the left, the doors rotate the same as each other, and the collisions on both doors work fine. On the right, the offset is applied to the red door. And the collisions break.
I don’t know exactly what’s going on here, but my guess would be that it has to do with CFraming the part completely to the opposite side of the axle out of sync with the physics engine step. In general, setting CFrame of a part from a server script does not respect collisions.
The safe way is to use the Motor6D’s you’ve already made as they were intended. For example, try replacing your Script with this:
The 4 fromOrientation lines are just to fix the orientation of the Motor6D axes relative to the parts. The motors are not aligned for the direction you want the doors to rotate. You can fix this once from the command line and then not actually need it in the runtime script. In fact, if the doors always spin, and at the same speed, no script is even needed. The motors will spin for the life of the server because of the arbitrarily large Desired Angle and slow rotation rate (unless your server stays up > 2.5 years )
When you let the Motor6Ds turn things, you get the benefit of client-side interpolation smoothing out the movement. When you set CFrames manually from server scripts, clients see positions update only as the property changes actual replicate, which is much less frequent and can be irregular. Note also that the stuttering of server-side CFraming is not visible even in Accurate Play Solo, since it is a consequence of real internet latency.