Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can I attach camera to players head?

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.

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)

1 comment

0

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.