This warning seems to have started to appear recently.
In my case, it always appears when I activate a free camera in my game.
Studio does not indicate a traceback.
Clicking on the warning, it shows this line inside the module “CameraModule.lua”:
I’ve been getting this warning recently as well. When I tested my code, I determined that it did occur when setting the Camera Subject, but not always. In my game, I change the camera depending on the different game type that is occuring for the player. When I change the camera to match the settings of the game they want to play, there is no warning. However, when I set the camera back to the original settings, it will always produce the warning.
if changeTo == "Default" then
workspace.CurrentCamera.CameraSubject = CameraSubject -- produces warning
workspace.CurrentCamera.CFrame = CameraCFrame
workspace.CurrentCamera.CameraType = CameraType
Player.CameraMinZoomDistance = MinZoom
Player.CameraMaxZoomDistance = MaxZoom
else
if CameraStates[changeTo] then
local cameraData = CameraStates[changeTo]
-- cameraData = {subject, position, max / min zoom distance}
workspace.CurrentCamera.CameraSubject = cameraData[1] -- produces no warning
workspace.CurrentCamera.Focus = cameraData[1].CFrame
workspace.CurrentCamera.CFrame = cameraData[2]
workspace.CurrentCamera.CameraType = "Scriptable"
Player.CameraMinZoomDistance = cameraData[3]
Player.CameraMaxZoomDistance = cameraData[3]
end
end
It’s really starting to get annoying at this point because I need to find some way to fix this without setting the camera type to anything else rather than custom.
Same thing here. Except this is happening when I set the CFrame. Been stressing out about this an entire day and couldn’t find anything on my end wrong.
I’ve debugged around with this, and this is definitely caused by the new vehicle camera update; the only step to reproduce it is to set your CameraType to Scriptable/update the CameraSubject.
I’ve also started to get this error within the past week or so… Whenever I set the CameraType to Scriptable in any local script this happens. The error killing my game’s performance. This problem immediately goes away as soon as I remove the lines below from all my scripts.
local camera = workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
I’m not sure if this is related here but when I play my game in Studio, the camera will focus on a part the second the player joins (as it is meant to do). However, when I play the game normally, my camera stays on my character’s head and never focuses on the part. I got that warning in the console.
EDIT: I found out what was happening for me, and it was my own stupidity not studio. I forgot I had a transparent GUI element covering the screen which was causing all the problems listed. Once I got rid of that, everything worked fine. /edit