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

Why the player's Torso kept rotating upwards?

Asked by 5 years ago

The player torso is rotating upwards towards the target but I want it to rotate straight

function BodyRotate()

local tTargeting = (script.Parent.track.targeting.Value)
local humanoidtag = tTargeting:findFirstChild("HumanoidRootPart")
local charRootPart = char:findFirstChild("HumanoidRootPart")
local charTorso = char.UpperTorso.Waist
local tTorso = tTargeting.UpperTorso.Waist

charTorso.C1 = tTorso.C1 * CFrame.new(Vector3.new(0, 0, 0), charTorso.C1.lookVector) * CFrame.Angles(tTorso.C1.y, 0, 0);

print(tTorso.C1.y)

end

Answer this question