Unable to move mouse while right-clicking when CameraType is Scriptable

Alright, this is my game where it’s happening: https://www.roblox.com/games/973170751/Trainware-Experimental-Lab#!/game-instances

and here’s a simple empty place with just the camera code: https://www.roblox.com/games/1000937559

Ah OK, I see the issue, thanks!

I will take a look at the camera code, because this is also a game I’ve really wanted to play every time you tweet about it, but I’ve never been able to get into the train before. Just now, I was in the cab, looking out of the left window (and of course unable to move the camera). But, prior to this, I’ve tried playing this game several times and have never even gotten in the train before. Normally, after the selection of train, station, platform, I’m left 1000+ studs above the track looking at the red brick, able to pan the camera, but with no working UI and nothing to do except Esc-Leave.

1 Like

No problem!

And ah yes, that’s one of the most reported bugs the game has received, which will be fixed in an update in the coming days. :smile:

1 Like

I’m also experiencing problems with the “Watch” mode for scenic flybys of my trains. Instead of staying where the user ‘placed’ the camera, after 2 seconds in, it locks itself facing forward and follows the train and cannot be moved again.

This never happened before it worked perfectly before the update.

I am pulling my head off because of this.

Please can someone confirm that it’s the Update and not my fault?

1 Like

Are you using Camera:Interpolate? It behaves strange after the update.

I’d recommend switching to using TweenService or a custom interpolation function for now:

1 Like

Is there any ETA on the fix? I’m kind of trying to push out an update to my game but I’m being held back by this :confused:

The flag will be turned off today, and when it’s turned back on next week it should not recur.


Yes this is the code

					Cam.CFrame = workspace.Desk.CameraStart.CFrame
					Cam.CameraType = 6
					for i = 90 , 1 , -1 do
						local NextCFrame = NPCHRP.CFrame * CFAngle

Can you provide a sample code or even better implement TweenService or CFrame:lerp() to my script. Thank you

Something like this should work:

Cam.CFrame = workspace.Desk.CameraStart.CFrame
Cam.CameraType = "Scriptable"

local tweenInfo = TweenInfo.new(10, Enum.EasingStyle.Linear)
local tween = game:GetService("TweenService"):Create(Cam, tweenInfo, {
	CFrame = workspace.Desk.CameraEnd.CFrame,
	Focus = workspace.Desk.CameraFocus.CFrame


for i = 90 , 1 , -1 do
	local NextCFrame = NPCHRP.CFrame * CFAngle

You can find more information about TweenService here.


Good to do this kind of update regardless, because Camera:Interpolate() is on our list of things to deprecate as of the next major update. Camera:Interpolate will still be available for a little while, but since it’s in the C++ camera class, it’s going to be one of those deprecated things that actually does go away, as opposed to just being hidden on the wiki and discouraged. All it does is simple linear interpolation of the camera and focus positions, along with keeping the camera pointed at the focus with each step, using the CFrame look-at behavior that has y-axis polar singularities.


This bug is CRITICAL and is affecting my game Velocity Flight Sim, rendering it completely unplayable within a few minutes - unhappy players are constantly reporting this issue (really bad experience for those just purchasing it as it’s paid access with many demanding refunds for an issue that we neither caused nor can fix).


This bug is also affecting my game and making it unplayable. I thought this would be fixed by now but please fix ASAP.


Still experiencing this issue, and it’s been a week since you posted this. (Sorry if that part sounded arrogant, was just pointing out the amount of time that has passed. I am also aware that it takes time to fix these things) Any update?

Thank you for your patience! It should be fixed for everyone with this coming Tuesday’s update. We elected not to simply turn of the flag globally because the move to Lua-based camera and control scripts is a very important prerequisite for upcoming features and very few places were seriously affected, only a handful of games with the magic combination of setting the camera type to Scriptable, using mouse input to control the custom camera, and also having the default Roblox camera scripts enabled and running. There shouldn’t be anything wrong with this, it should have worked as it always did whether the Roblox cameras are being used or not, but there is a bug in the Lua implementation specific to Scriptable. Impact was low only because most games with Scriptable-based custom cameras are either disabling the Roblox camera scripts entirely with an empty, disabled, or replacement CameraScript local script in StarterPlayerScripts, or the Scriptable type is only being used when the camera is not being directly controlled by user mouse input (e.g. kill cams, cut scenes, static shop views / 3D UI views, etc.)

For the impacted places that were called out above or sent to me via DM, I had the flag turned off selectively. It does take approximately a week for a fix of this nature to be live; it’s important to do the QA due diligence for player scripts, because they are used by more than 99% of Roblox games, so a fix made in haste could easily turn a bug affecting 8 games into one affecting thousands of games and millions of players.


@Coeptus @AllYourBlox

It’s still happening

I use the Exact same code provided and it’s still broken !!!


Before it broke

I use Roblox Video Recorder to Record both Videos, and the script works smoothly in game it’s the Recorder causing the Video to Stutter.

@Coeptus you are awesome for providing me with the script.
Maybe this time we can try CFrame:Lerp() ?

I didn’t posted it after the reply from Coeptus because I thought it would work fine and then I just found out that it doesn’t. :sob:

I hope this will be fixed soon @AllYourBlox , I also DM you the details a week or two ago but you never replied.

I’m just going to work on other stuff for now.


No problem :smiley:

Are you sure you’re using the updated camera scripts? If you have older versions saved in StarterPlayerScripts, the camera might not work properly.

1 Like

As noted above, the bug fix should be live with the next update (6/19). We selectively disabled the flag for public places developers reported as seriously affected. This is so the developers would not have to republish live games just to patch this. For any private places under development that are blocked by this, you can copy the camera scripts into your game and find the two references in RootCamera’s UpdateMouseBehavior() to LockCenter and LockCurrentPosition and exempt them from Scriptable. For example, changing

UserInputService.MouseBehavior = Enum.MouseBehavior.LockCenter


UserInputService.MouseBehavior = (game.Workspace.CurrentCamera.CameraType == Enum.CameraType.Scriptable) and Enum.MouseBehavior.Default or Enum.MouseBehavior.LockCenter

or the equivalent if-then structure. And the same for LockCurrentPosition.

1 Like

Ohh so that’s why, after I removed the old one and replaced it with the latest script it worked like it should.

Thank you soooo much @Coeptus :+1:t2:

Still having problems with the scriptable camera type, has the fix gone live tuesday at all?