UpperTorso not facing the part?
So, I'm trying to make the UpperTorso of my character face the humanoidRootPart of another player, only problem being i suck at math.
I honestly don't see what's wrong with this code
If anyone could explain to me how to do it i would be really thankful.
02 | local char = script.Parent |
03 | local hrp = char.HumanoidRootPart |
04 | local waist = char.UpperTorso.Waist |
06 | local space = math.atan 2 (hrp.Position.Y, target.PrimaryPart.Position.X) |
10 | waist.C 0 = waist.C 0 :Lerp(CFrame.fromEulerAnglesXYZ( 0 , math.rad(space), 0 ), 0.1 ) |
As you can see, it assigns the cframe just fine, but it doesnt want to turn the UpperTorso?
Please help if you can.