How to make a Welding Script?

I’m currently making a Ship for my Recent Game.

However the ship I have needs a weld system for Vehicles. So it doesnt cause an issue with move abilities when driving the ship.

I need it to be:

• Group Rank Lock.
• To Turn off and Turn on Weld.
• Proximity if possible.

Anyone know how I can start this off?
I have a Group lock script I just need a section to weld a Base to the wheels that are identified as: RR, RL, FL & FR.

I think it would be a Weld constraint. But, I am not 100% sure.

If you have any videos, Guidance to provide it would help me so much. Thank you!

Try using Weld Constraints and see if it works

How would i implement this into a script?

there is a property that is named “Part0” and “Part1”

its just like this:

local redpart = workspace.RedPart
local greenpart = workspace.GreenPart

local weld = Instance.new("Weld", workspace)
weld.Part0 = workspace.RedPart
weld.Part1 = workspace.GreenPart

Now even if the parts are unachored, they’ll just hold each other forever unless you break the weld. But there are some problems that you might wanna change the parts’ position to attach them together using a script.

2 Likes

What about them the parts are in a group? Like vehcile wheel’s?

What do you mean by that. Do you mean like when the wheel has multiple parts and you want to weld them?

So In a Model I have for a Vehicle, I have:
• A-chassis
• Wheel - FR, FL, RR, RL.
• Misc
• Body

I’d like to make the Wheel models called, RR, RL, FL & FR to weld to my base part.

Just make multiple welds.

Add a Weld to each part of the wheel which means that FR, FL, RR, RL have their own welds. Set each weld’s Part0 to the their parents. Set the Part1 to the name of the BasePart.

Is there a way to activate a weld? To turn it on or off?

1 Like

I really forgot the WeldConstraints’ properties so you can just check its properties for yourself, or you can just check this page.