Making the player look in the direction of their lookvector normalized by a set amount

Im trying to make the player face the direction of their lookvector using lookat but its not working for some reason, anyone know why?
It doesnt turn me relative to my look vector

root.CFrame = CFrame.lookAt(root.Position, Vector3.new(root.CFrame.LookVector.X,root.Position.Y,root.CFrame.LookVector.Z))

Couldn’t you just do this?

root.CFrame = CFrame.new(root.Position, root.CFrame.LookVector)

Another assumption is that you’re only firing it once

Yeah Ive tried alot of things and that was one of the things I tried off the bat and it didnt work because not only do I not want it to be looking up and down but it just plain doesnt work, and also yes it is in a loop

Ok wait now I’m confused
What do you mean by “face the direction of their lookvector”? Would you mean you also want to change the camera as well?

Like what I mean is that I want the player to constantly face in the direction of where they are looking, like imagine a block is right there say 5 studs in front of the player, thats what I want the player to look at but theres not really gonna be a block theres its gonna be the code for the player to look at the direction of their lookvector

The camera right now isnt very important right now what I want to do is make the player constantly face in the direction of where there looking

So from what I’m understanding, you want the Direction of the Character to look in a fixed certain position? I think I might know what you need?

root.CFrame = CFrame.new(root.Position, Vector3.new(25, 0, 0))

Idk if this will work but you can try it I suppose

Yes I want it to look in a direction but I want that direction to be relative to where my root part is facing

All I needed was to make humanoid AutoRotate disabled ;-;, sorry for wasting your time

I swear I was gonna send that haha

No worries you’re fine! I wasn’t sure if AutoRotate was gonna fix the issue, but now we know!

1 Like