How do I make the player's camera flip?

Hello, So, I want to make the player’s camera flip by 180 degrees, using the Remote Events, but It won’t work.

Here’s the Script:

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Lighting = game:GetService("Lighting")
local Events = ReplicatedStorage:WaitForChild("Events")
local FlipCam = Events:WaitForChild("FlipCam")
local ColorCorrection = Lighting:FindFirstChild("ColorCorrection")

while task.wait() do
	ColorCorrection.Contrast = -2.5
	FlipCam:FireAllClients(180)
	task.wait(1.5)
	ColorCorrection.Contrast = 0.5
	FlipCam:FireAllClients(-180)
	task.wait(1.5)
end

and the Local Script:

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
local Events = ReplicatedStorage:WaitForChild("Events")
local FlipCam = Events:WaitForChild("FlipCam")
local Camera = workspace.CurrentCamera

RunService.RenderStepped:Connect(function()
	FlipCam.OnClientEvent:Connect(function(angles)
		Camera.CFrame = Camera.CFrame * CFrame.Angles(0, 0, math.rad(angles))
	end)
end)

Any help is appreciated, thanks.

1 Like

It will work if You try to do the same thing but in X or Y axis. Here’s an example:
Camera.CFrame = Camera.CFrame * CFrame.Angles(math.rad(angles), 0, 0)
I think that this isn’t what You want but I know that rotating it in Z axis might work if You set CameraType to Scriptable.

1 Like

There’s a problem, the player’s camera won’t move manually, and stay in it’s position, which is not I want.

1 Like

Do You want to rotate the camera updside down?

I want the player’s camera to zoom in and out manually, and move their cam around, so rather than setting the camera type to scriptable, the camera type should stay in custom while their camera is flipped 180 degrees.

so like in parkour?

(remove30charrule)

I think that You need to script it by using Scriptable CameraType. I can’t see any other way of doing that.