Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you determine which part of a weld is the base part?

Asked by
Z_DC 104
6 years ago

I have posted a less clarified version of this question before on here and got no valid response, so here it is in a more clear way:

I am working on a kind of a control tool that lets players pick up other players. The script uses Motor6Ds as welds to make the players be joined together.

The problem is, for some reason the players who join later are always the "base part" while players who join earlier are always the part that gets teleported.

Here's a demonstration: Notice how Player1 always gets teleported to Player2.

https://gyazo.com/e6a1047a696871a0bd91ed04c9b071de https://gyazo.com/e5a0ced6d912baed7bb3f355ee76f0ee

Here's the code I am using to create the welds between the players:

local weld = Instance.new("Motor6D")
weld.Part0 = target.Torso
weld.Part1 = char.Torso
weld.C0 = CFrame.new(0,-.3,2.5)
weld.Parent = char.Torso

I've tried: -Changing Part0 and Part1, no effect -Changing just C0, just C1, both C0 and C1, no effect. -Anchoring char.Torso before the weld, no effect. -Changing the parent of the weld before and after -Using Weld, Motor, Motor6D

TD;LR: How do you determine which part of a weld is the base part (the one being teleported to)

Answer this question