Constraints locking vehicle up when spawned

I am seeing an issue where I am spawning trains which have more than one carriage (which have ball gliders to sit between the rails so are flush with the track with space to spare) and for the first few seconds or minutes it refuses to move. They are mostly set up in “locomotive” style where only the front carriage - where the user is sat - provides power to the rest of the train to move forwards, but it stutters and refuses to budge before suddenly being “accepted” by the system.

Sample 1 is how it seems to the average user - just spawning a train in and using the throttle to try and pull away. Nothing happens for some time before suddenly being able to move

robloxapp-20230810-1433154.wmv (6.1 MB)

Sample 2 is an example of how the train behaves when the Rod Constraint is disabled on the back of the locomotive itself (which is in two parts and they both have power) - nothing seems to happen. Then, when I disable the Rod Constraint from the individual carriage my user is in, it starts to move, but as soon as I enable it again it starts to “stutter” before coming to a stop again. It will stop and then, again, wait for a minute or two before suddenly being able to move.

robloxapp-20230810-1436150.wmv (5.3 MB)

It needs to be mentioned that upon spawning the train, network ownership is given to the user for the entire train model. These trains did work up until recently, I unfortunately don’t know the point at which they stopped working.

I have also looked at systems other games use and the only difference with them is that they still use BodyVelocity instead of LinearVelocity - has something gone wrong with the latter recently?

5 Likes

Hi yrreb,
Can you provide an .rbxl? So we can see your mechanism and triage this for you.

Thanks

Hi there - no problem, I’ll send a copy over. Thank you

Hi yrreb,
I think I found the problem. You have 2 LinearVelocity constraints per train, one at the front and one at the back. I removed the one at the back on the runner and it works great now. I’m happy to explain physically what I think is going on if you’re interested. But try removing the rear linear velocity and see how it goes…if you want dual locomotives one front and one back, just make sure only the relevant “pulling” LinearVelocity constraint is enabled.

Hi there, thanks for your response - and sorry for the duplicate post I made, thought I was losing my mind not being able to find this one…!

I’d be really interested to understand what’s going on. I’ll have a look into it, it’s quite perplexing as when I’ve used BodyVelocity in the past for this sort of thing it’s been in every carriage. Has there been a recent update which has changed the behaviour?