How to replicate 'cart ride around nothing'?

Does anyone know what kind of cart system was used in this game? It’s extremely modern and works buttery smooth but as if it uses physics, it derails at the right moments etc - it’s completely different to the older FM cart systems using buttons.

I can’t figure out how it’s done so any help would be much appreciated thank you! :smiley:

1 Like

It’s possible that the cart ride system in the game you mentioned is using a combination of physics and script to achieve the desired behavior.

One way to replicate a cart ride system like this would be to create a model representing the cart, and add a physics body (such as a Part) to it. The physics body can be configured to behave like a roller coaster cart, with a high friction and low bounciness to prevent it from derailing.

Next, you can create a path for the cart to follow using a series of interconnected parts or other objects. These objects can be parented to each other to form a chain, and can be positioned and oriented to create the desired shape of the ride.

To move the cart along the path, you can use a script that applies forces to the physics body of the cart. For example, you could use the “BodyForce” function on the physics body, and specify the desired force vector and point of application.

You can also use script to detect when the cart reaches certain points along the path, and trigger events or actions as needed. For example, you could use the “Touched” event on a part to detect when the cart collides with it, and use this to trigger a sound or visual effect.

By combining physics and script in this way, you can create a smooth and realistic cart ride system that can follow a complex path and respond to player input or other events.

1 Like

Yeah that kinda makes sense. The hard part right now is making the actual cart itself, like how is it constructed etc I’m lost :frowning:

1 Like

I made something. See if you can use it. It uses collision groups. One group for players and another group for the walls of the track. Players cannot collide with the wall, but the cart can, so it won’t fall off. Put a script inside the player’s CharacterStarterScripts to loop through all baseparts and set their collisiongroup to the players collisiongroup name. Select all the walls of the track and set it to their own collision group. In the collision groups in studio, untick where they intersect in the table so they won’t collide with each other. I already did all this in the game that you can take a copy. The train is designed like a simple car. It’s speed is initially 0, so when the player presses on the E to make it go, it will set the car’s speed to another number. When the player sits on the seat, it will set a number to the throttle to make it go by itself.

Note that I made it so that when the player jumps off, the car/train deletes itself so it won’t hang around. You can look in the scripts to change this if you want.