I am trying to create a script to move the camera around an object. Everything works fine until I try to give the control of the camera back to the player - I set the camera type to Custom however the camera does not move around the player as it should. Every other camera type (Follow, Track, Attach etc.) will work, just not Custom. What is the problem here.
connection = game:GetService("RunService").Heartbeat:Connect(function()
if i < 360 then
camera.CFrame = CFrame.new(target.Position)
* CFrame.Angles(0, angle, 0)
* CFrame.new(0, 10, 50 + 30 * math.sin(math.rad(i/2)))
angle = angle + math.rad(0.5)
i = i + 0.5
end
if i >= 360 and i < 420 then
i = i + 1
end
if i >= 420 and i < 480 then
camera.CFrame = camera.CFrame:lerp(game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame * CFrame.new(0, 2.5, 10), 0.1)
i = i + 0.5
end
if i >= 480 then
camera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
camera.CameraType = Enum.CameraType.Custom -- every other type works fine
connection:Disconnect()
end
end)

3 comments
Hi ik you have a little something if yours going on but, i asked a question about the same as yours in camera manipulation, could you help me on my question, im having trouble getting the camera?
Is this your default CameraScript or a LocalScript that disables CameraScript upon connection?
? It's an ordinary LocalScript within StarterPlayerScripts