Hi Programmers! I require your assistance with an AlignOrientation (presumably CFrame error). So, in my align orientation everything seems to work fine- the A.O’s
CFrame is set to follow the player’s mouse.
I seem to notice that it does indeed rotate left and right following the mouse on the Y Rotation Axis but it also seems to be rotating slightly (but not all the way (?) ) up & down ( Z Rotation Axis). Would anyone help me in making the Z Axis not change, only the Y axis (left and right)
My goal:
- Follow the mouse and rotate the HumanoidRootPart on the Y Axis
- The HumanoidRootPart does not move up and down on the Z Axis
CLIENT INVOKE SCRIPT
EventFolder:WaitForChild("GetMouse").OnClientInvoke = function()
local Mouse = Player:GetMouse()
local TORETURN = Mouse.Hit
return TORETURN
end
SERVER SCRIPT
RUN_SERVICE.Heartbeat:Connect(function(dT)
local MOUSE = EVENT_FOLDER:WaitForChild("GetMouse"):InvokeClient(PLAYER)
ALIGN_ORIENTATION.CFrame = MOUSE
print("SET")
task.wait()
end)
Any help would be appreciated! Thank you.