So I am trying to experiment with cameras for a little intro, and everything is going fairly well except for at the end, at which point I want the camera to be focused back on the character. It sometimes works, but sometimes, especially if I open multiple tests at once, the camera will not revert back to the character.
Here's what I have. First, this sends the camera back to the character:
workspace.CurrentCamera.CameraType = "Custom"
workspace.CurrentCamera.CoordinateFrame = character.Torso.CFrame
Then, I tried to fix the times when it had an error by doing this:
if
workspace.CurrentCamera.CoordinateFrame ~= character.Torso.CFrame
then repeat
workspace.CurrentCamera.CameraType = "Custom"
workspace.CurrentCamera.CoordinateFrame = character.Torso.CFrame
until
workspace.CurrentCamera.CoordinateFrame == character.Torso.CFrame
end
Sorry if it looks horrendous, I'm not experienced at all, so thanks for helping out!

2 comments
I believe all you need to have is a camera subject for custom to work (character humanoids are used by default)
Oh ok cool, that works too. However, how do I loop it in a way that it continues to try to fix the camera to custom until it is true?