Standard Camera is broken

I was working peacefully in my code when suddenly i tried running the game and the standard camera for the player is completely broken. I can move my character around but the camera stays in place, I can’t rotate or zoom in. I have no clue what could cause this since I haven’t even touched the camera with my code. I also get no warnings or errors indicating that something’s wrong.

Check what the CameraType is. If its Scriptable then you have to change it to Fixed

Can you send us the coode? We can’t help you without your code.

Weird. Have you tried stopping and replaying the game? Are you absolutely sure you haven’t changed any of the camera settings like CameraMode and Camera.CFrame? If yes, I think it’s a bug, so you can post a new topic in the appropriate channel.

The code is 682 rows long but I’ll include some old code that handles the scriptable part of the camera. I have not touched this particular piece of code for 3 weeks.

function UISTable.InputBegan(input)
if nVec[input.KeyCode] then
	Vec[input.KeyCode] = nVec[input.KeyCode]
elseif input.UserInputType == Enum.UserInputType.MouseButton2 then
	UserInputService.MouseBehavior = Enum.MouseBehavior.LockCurrentPosition
elseif input.KeyCode == Enum.KeyCode.LeftShift then
	speed = 0.1
elseif input.KeyCode == Enum.KeyCode.R then
	rotateItem()
end
end

function UISTable.InputChanged(input)
if input.UserInputType == Enum.UserInputType.MouseMovement then
	x = (x - math.rad(input.Delta.X))%(2*math.pi)
	y = math.clamp(y - math.rad(input.Delta.Y), math.rad(-89), math.rad(89))
	TweenService:Create(
		angle,
		TweenInfo.new(
			0.1,
			Enum.EasingStyle.Quad,
			Enum.EasingDirection.Out,
			0,
			false,
			0
		),
		{Value = CFrame.Angles(0, x, 0) * CFrame.Angles(y, 0, 0)}
	):Play()
end
end

function UISTable.InputEnded(input)
if nVec[input.KeyCode] then
	Vec[input.KeyCode] = nil
elseif input.UserInputType == Enum.UserInputType.MouseButton2 then
	UserInputService.MouseBehavior = Enum.MouseBehavior.Default
elseif input.KeyCode == Enum.KeyCode.LeftShift then
	speed = 1.5
end
end

for k, fn in pairs(UISTable) do
UserInputService[k]:Connect(fn)
end

function DefaultCam(dt)
local move = Vector3.new()
for _, v in pairs(Vec) do
	move = move + v
end
camera.CFrame = angle.Value + position
position = position + angle.Value * (move * speed)
end

No, I haven’t touched anything regarding the camera. I was working on some stuff with the mouse.

It’s in Fixed.
(30 char 30 char)

Could it be that roblox dropped an update that broke it? I’m registered to the Beta program.
I just noticed that the camera works perfectly fine when joining the place through my profile but in studio it’s broken.

I’m not sure about this. A new Beta programme was released 3 days ago. That might be the issue? I suggest you to recheck everything once before posting a bug report.

It has to be a bug though because it’s only in studio that the problem occurs.

It was a require() that broke the code. I moved it after line where i got the camera and that fixed it. Weird though that it didn’t break outside of studio.

1 Like