So this code rotates the player to where the mouse clicked, it works perfectly but when I click while moving it moves the player back a bit and I want that to stop. So what I'm asking is how to remove the positioning and only rotate (or a counter to the moving back)
player.Character.HumanoidRootPart.CFrame = CFrame.new(player.Character.HumanoidRootPart.Position, mousehitpos) -- mousehitpos is mouse.Hit.p
Hi you should use CFrame.Angles and math.rad.
read about rotationg objects using CFrame.Angles here:
https://developer.roblox.com/en-us/articles/Understanding-CFrame
an example code for using CFrame.Angles is:
local part = game.workspace.Part targetframe = CFrame.Angles(0, math.rad(10),0) part.CFrame = tragetframe
Notice how i used math.rad instead of just inserting an angle. This is because CFrame numbers dont work in the way you would expect (for some reason) so you could use math.rad if you want to refer to actual angles!
Hope this wasn't too confusing!
Any questions? Just ask!