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

CFrame rotating messes up final results?

Asked by 7 years ago

So, I have this script and it does work but the problem is that I had to mess with it to comply with a weld and the code no longer works so I rewrote it and it works up until I rotate the body... the rotation makes the character position itself really really high but the weld still holds. Can anyone help me adjust it to where the character will be rotated on the other characters shoulder?

CODE:

Weld.Part0 = killerTorso --// Object we are welding the torso too
Weld.Part1 = survivorTorso --// Object being welded
Weld.C0 = killerTorso.CFrame
Weld.C1 =  killerTorso.CFrame * CFrame.new(2, -4, 2) * CFrame.Angles(-90, 0, 0)

All help is greatly appreciated1!!

1 answer

Log in to vote
0
Answered by 7 years ago

Weld.C0 = killerTorso.CFrame:inverse()

That should work assuming you have already defined Weld as a variable.

0
All it did was put him on the other side of the map. Same thing happened, on the left side instead of right. xXLegendarySoldierXx 129 — 7y
Ad

Answer this question