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

Attaching a part to my back?

Asked by 5 years ago

I'm trying to attach a part to the back of my uppertorso using a weld. I've tried using * CFrame.new (0, -1.5, 0) to get it to the surface of the back of my uppertorso, and I can never get it right. Here's what I have so far:

local unequipWeld = Instance.new("Weld", player.Character.UpperTorso)
unequipWeld.Name = "UpperTorsoUnequipWeld"
unequipWeld.Part0 = unequipWeld.Parent -- My UpperTorso
unequipWeld.Part1 = Sword.Blade -- The part I want to attach to my back
unequipWeld.C0 = unequipWeld.Parent.CFrame * CFrame.new (0, -1.5, 0) -- Me trying to position the part to my back

Is there any way that I could get the part to attach to my back? Any help is appreciated.

0
watch this vid: https://www.youtube.com/watch?v=_E7XkEUs-uM it still works User#23365 30 — 5y
0
Alright, I'll try it out. 1000knives 9 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

If all you're trying to do is attach the part, try using a WeldConstraint.

If you use that, all you need to do is CFrame the part and set WeldConstraint.Part0 to the UpperTorso, and WelConstraint.Part1 to the Sword.

This CFrame may work...

local position = 
Sword.Blade.CFrame = UpperTorso.CFrame * CFrame.new(UpperTorso.CFrame.lookVector) * -1

-- I apologize if that's wrong hard to see what it's doing when not in Studio.
0
I’ll try it out. i have no experience with constraints 1000knives 9 — 5y
Ad

Answer this question