So basically just have it always facing the camera. Right now the script has it facing the direction of the players torso, I have a script locking the players torso to always face the mouse. I just need the camera to also face the mouse. Almost like shift lock. Actually exactly like shift lock. I am remaking shiftlock without the new mouse cursor.

game:GetService("RunService").RenderStepped:connect(function()
	if equipped == true then
		local cameraPosition = Vector3.new(char.Torso.Position.X + 2, char.Torso.Position.Y + 2.5, char.Torso.Position.Z + 5.3)
		camera.CFrame = CFrame.new(cameraPosition, cameraPosition + char.Torso.CFrame.lookVector)
	end
end)

Right now the Camera faces whatever direction the Torso faces. I have tried changing things inside the camera.Cframe to mouse.Hit.p (I have a variable for the mouse elsewhere) but that just causes the camera to spaz out and fly out of the map no matter where I put it. Anyone know what way I can fix this? Or something i'm looking over? Thanks

1 comment

0

camera.CFrame = CFrame.new(camera.CFrame.p,mouse.Hit.p)