How can I attach the camera to the players head? I have a script that makes the players head move up and down with the torso and I want the camera to follow with the head and torso.
COMMUNITY QUESTION
How can I attach camera to players head?
1 answer
game:GetService("RunService").RenderStepped:Connect(function()
local TweenService = game:GetService("TweenService")
local tween = TweenService:Create(workspace.CurrentCamera, TweenInfo.new(0, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0), {CFrame = CFrame.new(game.Players.LocalPlayer.Character.Head.CFrame)})
tween:Play()
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Thanks for responding! I put this script in a local script and i get an error that says "14:55:25.638 - Workspace.1mastermind.Script.LocalScript:3: bad argument #1 (Vector3 expected, got CFrame)" On line 3 of the code you gave.