Well first off you cant do anything with the camera unless you set it to scriptable, basically setting a camera to scriptable makes it so you can actually script it, its an Enumeration used for the CameraType property of Camera, after you set to scriptable then you set the CFrame in a local script
OK. So to do this, you will need to constantly set the CFrame Position above the characters head, with a LookVector that is facing the character. Let me whip up a quick example.
Just a note; you’re using the wrong type of operator in your code. The == should only be used to compare two values. You’re using it to change a value; for that you should use the = operator.
This is not tested, but this is the basics of how you could go about this:
player = game.Players.LocalPlayer
character = player.Character
hrp = character:WaitForChild("HumanoidRootPart")
camera = workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
RunService = game:GetService("RunService")
RunService.RenderStepped:Connect(function() --use RenderStepped to refresh the camera, every time the player's screen is refreshed
camera.CFrame = CFrame.new(hrp.Position + Vector3.new(0,10,0), hrp.Position) --set the CFrame of the camera to be 10 studs above the character, and looking down at the HumanoidRootPart
end)
If you wanted to add a tilt, you could just shift the first parameter(Position) of CFrame.new to one side a tad.
I accidentally said this to ExcessEnergy, but I will say it to you again to make sure you see it. Make sure you are using the = operator instead of the == operator to change values. You are using the == operator, which is used to compare two values; you should instead use the = operator.