Help with camera script

how do i make this where once u touch a block your camera goes where the block is

    local function OnTouch()

local camera = workspace:WaitForChild("Camera")
camera.CameraType = Enum.CameraType.Scriptable

local subject = workspace:WaitForChild("CameraParts").NewCam
camera.CameraSubject = subject
camera.CFrame = subject.CFrame

print("Shifted camera to Solo!")

end

script.Parent.Touched:Connect(OnTouch)

https://developer.roblox.com/en-us/api-reference/property/Workspace/CurrentCamera
look into CurrentCamera instead of getting the Camera in workspace

Touch for new cam is what you block you need to touch for the script to work the other new cam is where ur camera is gonna be and camera focus is what it’s gonna Be looking at

What you should in theory do is get those 2 parts of yours into your script, and assign their CFrames to the camera’s position and focus when the touched event is fired.