Rotating Cylinder with HingeConstraint Causing Lag in Squid Game Mingle

Hey Developers,

I’m working on a Squid Game-inspired mingle game, and I’m running into an issue with a rotating cylinder/platform that’s meant to challenge players. I’m using a HingeConstraint to make the platform rotate, and players should be able to stand on it with some grip.

It works fine at first, but after some time (not always at the start, but randomly), it starts causing lag for every player in the game. The lag gets so bad that it’s unplayable.

The issue happens even when testing on an empty baseplate, so it doesn’t seem like anything else in the game is causing it. I’ve tried adjusting various HingeConstraint settings like MotorMaxTorque and AngularVelocity, but the lag keeps happening at random.

Has anyone else experienced this or knows why this might be happening? Is there another way to make a smooth rotating platform for this type of game without running into lag issues?

Thanks in advance for any help!
-5qBacon :wave:

1 Like

Still looking for help on this issue—any tips would be greatly appreciated!

When you isolated the issue to a baseplate was it seriously JUST some parts and a HingeConstraint? Or are there any scripts you can show us that would be a more likely cause of any lag? Also is it a network choppiness where the server is lagging and clients still have normal FPS or is it a clientside lag where the clients all experience low framerate?

The setup is just an empty baseplate with two parts and a HingeConstraint—there’s absolutely no code involved. What’s strange is that it works fine sometimes but often bugs out, causing server-side lag and even makes the rotating part to stop rotating (for everyone). Everyone in the game experiences the issue simultaneously, and we can see each other lagging as well, which shouldn’t happen with something as simple as a HingeConstraint and no scripts added.

That’s pretty odd… What I could suggest is, if you haven’t already, check whether this is a network ownership issue where the whole plate stutters and therefore causes problems when the server starts juggling network ownership of the plate between clients? Try enabling visualisation of network owners and seeing whether this issue happens when network ownership likely inevitably transfers;

If this is the issue, you can use a script to run Plate:SetNetworkOwner() and by not giving a player as the parameter, you’ll tell the physics handler to never give network ownership to any client. (Even if this isn’t the issue I’d suggest doing this for such a large part of the map as if an exploiter abused their network ownership of the part it could also cause issues in the game too)