"Can you write a camera script that makes the player's head follow the mouse?"
xxxxxxxxxx
-- LocalScript placed in StarterPlayerScripts
local Player = game:GetService("Players").LocalPlayer
local Mouse = Player:GetMouse()
local RunService = game:GetService("RunService")
local function updateCamera()
local character = Player.Character
if character then
local head = character:FindFirstChild("Head")
if head then
local mousePos = Mouse.Hit.Position
local lookAt = Vector3.new(mousePos.X, head.Position.Y, mousePos.Z)
head.CFrame = CFrame.new(head.Position, lookAt)
end
end
end
RunService.RenderStepped:Connect(updateCamera)