As the title suggests, I want your camera to turn right, from where you are facing, when you press D. Here’s my code, what do I optimise?
elseif key.KeyCode == Enum.KeyCode.D then
Rightwards = true
Leftwards = false
while Rightwards do
camera.CFrame = camera.CFrame + (camera.CFrame.LookVector * Vector3.new(-1, 0, -1))
^ above is the important line
wait()
end
end
The “important” line makes the camera move straight forwards but I need it to go right →
Thanks!