HingeConstraint Lagging On Computer

Hello, I am making some peppers move with hinge constraints, but they lag sometimes.


I tried setting the network ownership to the server, but it didn’t change anything.
Also, if I separate the peppers, they don’t lag anymore.

I am just using a hingeConstraint with motor type.

Also, making the peppers slower seems to make it lag less.

So, what could be the problem?
Thanks :slight_smile:

1 Like

As you stated slowing it down makes it lag less, so just slow it down a little bit, and if it still doesn’t work, just a guess but tweening might be able to do it too.

What are the Densities of the Meshes? I’ve found that HingeConstraints may have issues like this when connected to something that is Massless or has a really low Density.

I can’t use tweenservice because I want the player to stay on the part.

I don’t know, I made them in blender, so I know the peppers are empty inside. So, maybe it does have really low density.

It’s still possible to do that with tweenservice, I did it in one of my games (unless it’s been changed)

I don’t think it’s lag since it’s each pepper individually. Pretty sure it’s one of the motor or Mesh’s Properties.

When you select the MeshPart look in the Properties window.
If the Massless box is checked (on) then it’s massless.
What is the Torque set at for your Motors? You may want to set it to a higher number if the motors are ‘stalling’.
Also I’ve seen issues if the motor speed is set low, it’ll behave that way as well. See if upping the speed slightly
When you are in test mode does each pepper still set to have the NetworkOwnership set to Server or has it changed when you get close to it?

Can you please show me how? I have never known you could do that.

If you press the windows key and search “Task” then click Task Manager, then go to the “Processes” tab, click programs that you see are using a lot of ram and at the bottom right click “End Task”.

Yes, they are massless, I made them massless because I thought it would be easier for the hinge constraint to rotate them.

They are all set to extremely high torque, close to infinity.

I don’t know if they changed, but I set them to server and they didn’t change much.

Don’t check the Massless box (as in, don’t make them Massless) since that’s given me issues on trying to rotate HingeConstraints.
You can go to the Custom Properties box and check that to change the Density manually of each pepper. Try with the default Density first though.

Hi, I turned on custom physical properties and tried the default density first, and then made it maximum density, but it still seems to have some lag.
This is what makes up the pepper rotating
image

This is the hinge constraint properties
image

See if changing the AngularVelocity to something a bit higher. I know I’ve had issues with ‘low’ values in this area before. Seems they get stuck if they try to rotate too slow.
If you need to go slower you may need to try a couple HingeConstraints at the same location, with the same settings, to try to keep it rotating without stopping momentarily.

I tried making it faster, but it still has the same result.

transfer the network ownership to the player when they step on it, and then leave it on the server when they aren’t on it. It will lag if the players connection is poor, there is really no fixing that. Unless you use renderstepped and change the orientation of it on the server.

1 Like

Hi, I will try that, but let’s say that there is one player in the server, and they touch lots of parts and all the parts set their network ownership to the player, will the player start lagging?

I’m pretty sure he was talking about how to make the player move with the part using tween service :joy: