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

How do I weld two player's characters together?

Asked by
KarlXYZ 120
8 years ago

So I'm trying to make handcuffs that have multiple functions and one of those functions is detaining an individual. I need the tool to effectively weld another player to the player who is using the handcuffs.

The issue I'm having is that sometimes when a player is welded, the person using the handcuffs is flipped upside-down.

This is what I'm aiming for to happen 100% of the time.

However, this is what sometimes happens when using the tool and is not what I'm aiming for.

From these screenshots, it seems that the handcuffs are always in the right position relative to the player being handcuffed, but sometimes everything but the right arm of the player using the handcuffs is rotated 180 degrees...

local weld = Instance.new("Weld", playerO.Character.Handcuff.Handle)
weld.Name = player.Name
weld.Part0 = playerO.Character.Handcuff.Handle
weld.Part1 = player.Character.Torso
weld.C0 = CFrame.new(0, 0, -0.5) -- '-0.5'prevents clipping with handcuffs and player

There is more to the script than just these 6 lines, but I believe these are the only ones relevant to the problem. These 6 lines are the only ones that manipulate the other player. The welding side of things runs on the server as the tool needs to be compatible with FilteringEnabled.

playerO is the handcuff user's player instance. player is the player instance who's character is to be welded to playerO's character.

1 answer

Log in to vote
0
Answered by 8 years ago

I see what happened. I do have a question, are the handcuffs a tool used by the (just for instance because these are who usually use them) "officer?" If so, you could try two things, making a better weld script that rotates whoever, or by rotating the entire tool, using the tool properties, be it by plugin, or by rotating the tool manually using the grip CFrames in the tool properties,

0
You need to understand the difference between a comment and an explanation. Please use comments for this kind of talk instead. unmiss 337 — 8y
0
well, I wasnt able to before. but i can now, so i will. rollercoaster57 65 — 8y
Ad

Answer this question