How would I weld a part to the character?

How would I weld a part to the character? What I mean is, let’s say i want a part to be welded to the characters right arm when they join. How would I do that?

4 Likes

try inserting the qPerfectionWeld model that @Quenty made into the characters model?

like for instance, you could keep the script inside ServerScript Service and clone it when you need it
ex:

local weldscript = game.ServerScriptService.qPerfectionWeld

game.Players.PlayerAdded:Connect(function(plr)
wsclone = weldscript:Clone()
weldscript.Parent = game.Workspace:WaitForChild(plr.Name)
end)

granted, its probably a cheap way of doing it but imo its efficient!

I haven’t tried it, so let me know if it works.

You can also create Motor6Ds for the limbs and set the properties from there
example:

local Players = game:GetService("Players") -- gets the players service
local Object = [insert object directory] -- replace [insert object directory] with something like (workspace.Baseplate, script.Parent, etc.)

Players.PlayerAdded:Connect(function(player) -- detects when a player joins the game
   player.CharacterAdded:Connect(function(char) -- detects when the player's character loads
       local RightArm = char:WaitForChild("Right Arm") -- wait for the RightArm to load

       local Motor = Instance.new("Motor6D") -- creates a new Motor6D
       Motor.Part0 = RightArm -- sets the first part to "RightArm"
       Motor.C0 = RightArm.CFrame -- sets the first CFrame to the RightArm's CFrame
       Motor.Part1 = Object -- sets the second part to "Object"
       Motor.C1 = Object.CFrame -- sets the second CFrame to Object's CFrame
       Motor.Parent = RightArm -- sets the Moto6D's parent to RightArm
   end)
end)

-- in a Server Script

This snippet only works for R6 however.

4 Likes

So, when the object gets welded to the arm, does the object keep its original position? Or does its position go the the cframe of the arm? like lets say i wanted the part to be welded to the side of the arm, how would i do that.

1 Like

Funky mini-tutorial I wrote a while back:

There are attachments along the player’s arms, typically in the center, that you can weld to. It’s just up to you to apply a slight offset by moving the attachment in the object to be attached to the arm.

2 Likes

No, it’s position moves to the arm’s position. (be sure to turn off “Anchored” and “CanCollide” for the object however.) You also use @lesserfantasy’s tutorial

where’s the tutorial located?

1 Like

the tutorial he linked in his post

1 Like