put this inside playercharacterscripts and make it a local script
local plr = game.Players.LocalPlayer
plr.CharacterLoaded:Wait()
while true do
wait(0.01)
game.Workspace.CurrentCamera.CameraSubject = plr.Character.Head
end
my Camera.CameraType is Enum.CameraType.Custom and i’ve tried setting the Camera.CameraSubject to Player.Character.Head but it only tracks the position
this script works but i cant move my camera anymore.
local char = game.Players.LocalPlayer.Character
local head = char:WaitForChild("Head")
local whitelist = {
"UnionOperation",
"Part",
"BasePart",
"MeshPart"
}
game:GetService("RunService").RenderStepped:Connect(function()
workspace.CurrentCamera.CameraSubject = head
workspace.CurrentCamera.CFrame = head.CFrame
char:WaitForChild("Humanoid").AutoRotate = false
for i, v in pairs(game.Players.LocalPlayer.Character:GetDescendants()) do
if v.Name ~= "HumanoidRootPart" and table.find(whitelist, v.ClassName) and not v:FindFirstAncestorOfClass("Tool") then
v.Transparency = 1
end
end
end)
local char = game.Players.LocalPlayer.Character
local head = char:WaitForChild("Head")
local Humanoid = char:WaitForChild("Humanoid")
local root = char:WaitForChild("HumanoidRootPart")
game:GetService("RunService").RenderStepped:Connect(function()
local currentCFrame = workspace.CurrentCamera.CFrame
local rollCFrame = CFrame.Angles(0, 0, head.Orientation.Z - root.Orientation.Z)
workspace.CurrentCamera.CFrame = currentCFrame * rollCFrame
end)
In this video the camera moves when the animation is played.
I want the same effect. but instead of the camera being animated, it’s the head that is being animated, and the camera is tracking the head automatically. i’ve already made an ok-ish solution, maybe you can come up with something better.