Camera Manipulation Not Working

local plr = game.Players.LocalPlayer
repeat wait() until plr.Character
local c = plr.Character
local cam = workspace.CurrentCamera

game.ReplicatedStorage.cam.OnClientEvent:Connect(function()
	local P = Instance.new("Part",workspace)
	P.CFrame = c.HumanoidRootPart.CFrame * CFrame.new(0,0,2)
	P.Anchored = true
	P.CanCollide = false
	cam.CameraType = "Fixed"
	cam.Focus = P.CFrame
end)

This is in starterplayerscripts I tested and it does fire but.

you ca just setting focus and not the actual camera location you can do that by setting cam subject and maybe the camera cframe when setting it scriptable type
if you use that and want to reset the cam back use custom type

you can read more on what each one does here

local plr = game.Players.LocalPlayer
repeat wait() until plr.Character
local c = plr.Character
local cam = workspace.CurrentCamera

game.ReplicatedStorage.cam.OnClientEvent:Connect(function()
	local P = Instance.new("Part",workspace)
	P.CFrame = c.HumanoidRootPart.CFrame * CFrame.new(0,0,2)
	P.Anchored = true
	P.CanCollide = false
	cam.CameraType = "Fixed"  -- may need to change this to scriptable and then set the cam.CFrame to something like:  p.CFrame - Vector3.new(10,5,0) may have to adjust this is the distance the camera would be from that object
	cam.CameraSubject = P  -- this will make the camera look at the object  -- this is normally Humanoid
	cam.Focus = P.CFrame  -- this just sets to render this area prioritize
end)

I’d just do this instead. First up, you need a part called ‘CamPart’, with Anchored on. Then make a LocalScript in StarterGui, and put this code in:

local Player = game.Player.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Camera = workspace.CurrentCamera

repeat wait()
Camera.CameraType = Enum.CameraType.Scriptable
until Camera.CameraType == Enum.CameraType.Scriptable
Camera.CFrame = workspace.CamPart.CFrame

I don’t want this camera to spawn in the middle of the map i want this to be a skill, when you click “z” it fires the cutscene near the player not in the middle of the map.

There’s no loop inside the script for the CameraPart to follow the HumanoidRootPart so the part will just stay there maybe this should work.

local plr = game.Players.LocalPlayer
repeat wait() until plr.Character
local c = plr.Character
local cam = workspace.CurrentCamera

game.ReplicatedStorage.cam.OnClientEvent:Connect(function()
	local P = Instance.new("Part",workspace)
    coroutine.resume(coroutine.create(function()
         while true do
            wait()
            P.CFrame = c.HumanoidRootPart.CFrame * CFrame.new(0,0,2)
         end
    end))
	P.Anchored = true
	P.CanCollide = false
	cam.CameraType = "Fixed"
	cam.Focus = P.CFrame
end)

this coroutine will make the other lines work while the loop is setting the CameraPart’s CFrame to the HumanoidRootPart

I’m scripting a sasuke transformation and I wanna make a cool transformation cutscene so my goal isn’t to make it follow the character.

You should have said that in the beginning, not wait for Source Code to come in to explain.

You cant focus the camera to a CFrame , you should used Camera.Subject or Camera.CFrame.Angles