Argument
is mouse
Player.Character.HumanoidRootPart.CFrame=Player.Character.HumanoidRootPart.CFrame*CFrame.Angles(0,Argument.Y,0)
I tried making a script where when you mouseclick your character turns to the Y position of your mouse. But I end up with a broken character. I really need your help pls
You are trying to place a 2-Dimensional value (Mouse.X) inside a 3-Dimensional one (CFrame). Mouse.X is basically the x coordinate of the 2-Dimensional screen, and so using that would not work for a 3-Dimensional position like CFrame. That said, you would want the HumanoidRootPart's CFrame to be the X value of the mouse's Hit property, which is basically the CFrame value of where the mouse is pointing:
--Assume hrp is the HumanoidRootPart you are trying to use hrp.CFrame=CFrame.new(hrp.Position)*CFrame.Angles(0,Argument.Hit.x,0)
Please accept answer if this helped :)