1
\$\begingroup\$

I am currently creating a car game in Roblox which has many ramps. For visual fun, I have created an unanchored (movable) burning car laying next to it so it looks like a car already tried this extreme ramp and crashed. I want the fire to move with the car when the car is getting pushed. I am new to Roblox game dev (ca. 3 days).

The scene structure of the burning car:

enter image description here

(The two black painted objects are objects that are not related to this burning car and thus are irrelevant for this question.) The three Model > Part > Fire things are the fires, the MeshPart below them is the actual car.

This is how the car looks like:

enter image description here

The fires are anchored. If I unanchor them, they fall off the map (they don't have a collider so touching the fire/car won't cause problems). When I anchor them, they are fixed on the current location and only the car moves away.

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

When it comes to unanchored objects, Roblox allows for welding objects together so they move as one entity. If you want the fire to move with the unanchored car, you can weld the Parts which contain the fire to the car, allowing them to move as one entity.

There are a couple of ways you can go about doing so:

  1. You can use a WeldConstraint object and insert one into each Part which has the fire effect. Once you've done so, you can edit the Part0 and Part1 properties, and select the Car and respective parts with the object selector. Check the Roblox documentation if this is troubling. https://create.roblox.com/docs/reference/engine/classes/Weld

  2. There is a Constraints tab in the Model section in the top bar which allows you to draw these welds between parts. Make sure to select WeldConstraint in the drop down menu at the top of the section, and then use your mouse to select the two parts you want to weld.

Just a reminder to unanchor all of the parts you want welded! Anchoring one of those parts will lock the entire model in place. Let me know if you have any further questions. :)

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .