Let's just say we started with a normal camera. The default classic one and you are zoomed out in third person. The server fires a "cutscene" event that makes your camera view positions. However, when I finish using the event, I revert that camera back to how it was. It was perfect after I was done using it, but whenever I used shift-lock and first-person, the mouse doesn't stay centered! Does anyone have an explanation for this? Thanks!

local c = workspace.CurrentCamera
local plr = game.Players.LocalPlayer

game.ReplicatedStorage.CutsceneEvent.OnClientEvent:connect(function()
	if workspace:FindFirstChild("CameraPart") then
	c.CameraType = "Scriptable"	
	
	c.CFrame = workspace.CameraPart.CFrame
		
		local blackscreen = Instance.new("ScreenGui",plr.PlayerGui)
		blackscreen.Name = "FadeBlackGui"
		local blackframe = Instance.new("Frame",blackscreen)	
		blackframe.Size = UDim2.new(1,0,1.05,0)
		blackframe.Position = UDim2.new(0,0,-0.05,0)	
		blackframe.BackgroundTransparency = 1
		blackframe.BackgroundColor3 = Color3.new(0,0,0)
		
		for i = 1,125 do
			wait(0.05)
			c.CFrame = workspace.CameraPart.CFrame
			workspace.CameraPart.CFrame = workspace.CameraPart.CFrame * CFrame.Angles(math.rad(0),math.rad(-1),math.rad(0))
		end	
		
			for i = 1,0, -0.1 do
				wait()
				blackframe.BackgroundTransparency = i
			end
			c.CameraType = "Custom" -- This line and the one below it is what i did to revert the camera.
			c.CameraSubject = plr.Character.Humanoid
			wait(5)
			for i = 0,1, 0.1 do
				wait()
				blackframe.BackgroundTransparency = i
			end
		
		blackscreen:Destroy()

2 comments

0

the Default Camera Type is "Fixed" i don't know if you want it on Custom though

0

Thx I'll see what I can do