I have a small alarm light which has a SurfaceLight on one side of the central moving part. This part spins with hinge when alarms are activated so the surface light also moves. This is the effect I want. However as it can be seen from the vid:
this movement starts to stutter when I move away from it and totally stops after some. Central part has CanCollide off so it’s not friction, also I tried with higher MaxTorque and angular speed however both didn’t work. This works perfectly on run mode so it’s surely something with client physics.
PS: Alarm gets activated by a local script for settings reasons (it’s a flashy effect so some people will want to turn it off) and I want to keep it in a local script.
It doesn’t work with proximity, local script changes its actuator type to Motor and gives it proper values. Script runs fine, it’s not something about the script, that’s why I asked in this category. It’s about physics.
Leave the HingeConstraint as a Motor, use the script to change the AngularVelocity from 0 to whatever you need.
How much Torque do you have the Motor set to? I’d start it at 20000 since higher values won’t be an issue, but a value that’s too low will.
Are the alarm light Parts CanCollide on and hitting the wall? That drag could be your issue as well.
Run mode and play mode have weird bugs when dealing with Physics sometimes.
A laggy game in Run will have Hinges that work just fine, but if you Test it the addition of the Player and other gameplay scripts running can lag and cause Physics issues.
Throttling on a simple hinge? I have multiple hinges working on vehicles as well as stationary objects and none even hiccup… i guess that could be the case, ive just never seen it.
If this is the case fire an event to the server to get it going.
Your hinges in vehicles are activated by server. I tried on an empty baseplate with all workspace extra features at default or even disabled and when the client activates the hinge, it just throttles when you get away from it. The game I did this for is of course more heavy in performance so it throttles earlier. However when I activate from the server, it works perfectly on both my game and the baseplate.