wait(1) local player = game.Players.LocalPlayer local camera = workspace.CurrentCamera local mouse = player:GetMouse() mouse.Move:Connect(function() camera.CFrame = CFrame.new(mouse.Hit.lookVector * 5) print(CFrame.new(mouse.Hit.lookVector * 5)) end)
Why is the camera stuck in position and is not following the camera? the printed message changes when i move the mouse,but not the camera.
You need to set the camera type to CameraType.Scriptable if you do not set it to Scriptable you are not allowed to edit the camera using a script
wait(1) local player = game.Players.LocalPlayer local camera = workspace.CurrentCamera local mouse = player:GetMouse() camera.CameraType = Enum.CameraType.Scriptable mouse.Move:Connect(function() camera.CFrame = CFrame.new(mouse.Hit.lookVector * 5) print(CFrame.new(mouse.Hit.lookvector * 5)) end)