Welded parts falling

this is my script:

local ParentPart = workspace.p
local ChildPart = workspace.c

local Weld = Instance.new("WeldConstraint")

Weld.Parent = ChildPart
Weld.Part0 = ChildPart
Weld.Part1 = ParentPart

ParentPart.Anchored = false
ChildPart.Anchored = false

Baseplate.rbxl (53.1 KB)

don’t know what I’m doing wrong, I’ve tried motor6ds and nothing changes

The Weld needs to be parented to something in order to work.

My mistake, I’m tired.

This gif shows it working? What is the problem you need fixing?

i want it to stay in the air and not fall

Ah I see. What you’re currently doing is welding two parts together so that they move together. If you simply want them to not move at all, make sure both are Anchored. Note that if you plan to keep both anchored forever, there is no point in welding them together.

i want to move them together in the future, but i obviously can’t cause its anchored. i’ve welded them because i want to avoid moving these parts individually

Where is the script located? And have you checked if the WeldConstraint is actually parented to ChildPart?

image

(after the script is ran)

let me see the weldconstraint properties while playtesting

image

Then everything should be in order, you can have a weld on anchored parts, it’ll take into effect when they are unanchored. Is there a problem I’m not understanding?

i just watched the video. the weldconstraint is working properly. “falling” is caused by these pieces of code:

ParentPart.Anchored = false
ChildPart.Anchored = false

p.s. weldconstraint will help stick parts together, but it will not work the same as anchoring

i just can’t move them together while they are anchored, only the “p” object is moved (moving by cframe)

tried removing those lines, nothing has changed

Welds are physics-based, as such while they are anchored they won’t work how you expect. If you want to move multiple parts together while anchored, I recommend grouping them and using :PivotTo() on the group instead.

parts will always fall if they are unanchored and even welded. welds are pretty much useless if you plan to keep them anchored.

I could be wrong, but if you want to avoid using a group, I believe if you keep Part1 unanchored it’ll still follow Part0, even if it’s anchored. Try it out.

worked, thanks for all of this yall

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.