Camera breaking upon disconnecting function

local centreCFrame = CFrame.new(9.196, 40, 258.538)
local offset = CFrame.new(70,0,0)
local currentCamera = workspace.CurrentCamera
local cameraCircle;



cameraCircle = game:GetService('RunService').RenderStepped:Connect(function()

   centreCFrame *= CFrame.Angles(0, 0.0125, 0)

   currentCamera.CFrame = CFrame.lookAt((centreCFrame * offset).Position , char.HumanoidRootPart.Position)

end)
-------------------------------------------------
cameraCircle:Disconnect()
currentCamera.CFrame =  CFrame.lookAt((centreCFrame * offset).Position , char.HumanoidRootPart.Position)

Basically, I’m trying to make the player’s camera spin and stop but disconnecting the spinning function brings the camera right infront of the player and breaks it and changing it’s CFrame afterwards doesn’t work. No errors btw

Instead of

cameraCircle = game:GetService('RunService').RenderStepped:Connect(function()

and

cameraCircle:Disconnect()

Try this:

game:GetService('RunService'):BindToRenderStep("CameraCircle", Enum.RenderPriority.Camera.Value + 1, function()

and

game:GetService('RunService'):UnbindFromRenderStep("CameraCircle")

I sort of doubt that will fix your problem, but who knows.

Didn’t work, same issue
character limit

Can you share the entirety of your script? Do you have other scripts which manipulate the camera?

I restarted studio and it works fine now, I’m assuming it was because of the lag that was caused by my other scripts(they dont affect the camera). Anyways, thanks for the help, i appreciate it