"ActivateCameraController did not select a module"

I made an intro cutscene. Heres the code inside starterplayerscripts:

local TweenService = game:GetService("TweenService")


local camera = game.Workspace.Camera


local cutscenetime = 24

local tweenInfo = TweenInfo.new(
	cutscenetime,
	Enum.EasingStyle.Sine,
	Enum.EasingDirection.Out,
	0,
	false,
	0
)


function tween(part1,part2)
	camera.CameraType = Enum.CameraType.Scriptable
	camera.CFrame = part1.CFrame
	
	local tween = TweenService:Create(camera, tweenInfo, {CFrame = part2.CFrame})
	tween:Play()
	game.Players.LocalPlayer.PlayerGui:WaitForChild("Intro").Holder.PlayFrame.Play.MouseButton1Click:Connect(function()
		wait(0.5)
		tween:Cancel()
		camera.CameraType = Enum.CameraType.Custom
	end)
end

repeat
	wait()
until game:IsLoaded()

game.ReplicatedStorage.Events:WaitForChild("SetWalkSpeedEvent"):FireServer(0,0)
tween(game.Workspace.Camera_1, game.Workspace.Camera_2)

For some reason it doesn’t always set the cameratype to scriptable. Instead it stays custom and i get this warning “ActivateCameraController did not select a module”. The cutscene still plays although the cameratype is still custom because of the bug. However, mostly it works fine but sometimes it doesn’t. How do I fix this?

1 Like

Consider changing the workspace.Camera to game.Workspace.CurrentCamera? Idk

I’ve explained this a couple of times before, but my assumption is that the script is instantly guessing that there’s already a Camera object inside the game, so it’s assuming that there’s also a ActivateCameraController Module inside, but in all reality the script fires way too quick (At the point of impact where the Camera doesn’t even create in time)

An alternate fix would be just to add a simple wait() before you set the CameraType to Scriptable (Cause for some reason that works)

3 Likes

You need to use a RenderStepped event to keep the workspace.CurrentCamera attached to the part when you tween, you also shouldn’t worry too much about that warning.

But it’s not only the warning, it also doesn’t change the cameratype when I get this warning so after the cutscene it would teleport the camera back to the players head although I didn’t script it like that.

Do as @Jackscarlett said, do a Wait() before you set the cameratype, that works because Wait() waits for task schdueler’s next cycle, so the next cycle you would be able to set the camera type. And I highly recommend you use RunService.RenderStepped to keep the camera’s CFrame to that invisible part you have, and once the tween is done, you just disconnect the RenderStepped like this:

local runService = game:GetService("RunService")
local Camera = workspace.CurrentCamera
local Part = workspace.part1

local Stepped
Stepped = runService.RenderStepped:Connect(function()
     Camera.CFrame = bCam.CFrame
end)
--Finish your tween then disconnect like this:
Stepped:Disconnect()

Thank you! But for some reason adding the wait() only works in studio. When I joined the game I still got the warning. Is there another way to make the cutscene play when a player joins? Is there a way to check if the camera is loaded correctly?

This may be due to the fact that using wait() works on the server side as well I believe & Studio may have a bit of a delay when starting the game

I think you can use RunService’s RenderStepped event so that it waits for the client to fully load everything, but I’m not exact

I tried a RenderStepped event in a different local script (also in the StarterPlayerScripts) and it fired even before the tween function started. In the tween script I used repeat wait until game:IsLoaded() but why isn’t the camera loaded then? Is RenderStepped the only way to detect if the client fully loaded?

Maybe try using Heartbeat or Stepped instead? It that doesn’t work either, just set the wait() to wait(5) or something

This bug has existed for a long time and I had problems with it too. Here’s how to solve it.

As @Vaschex said, this is just an issue with the core camera scripts. It doesn’t actually affect your game in any way and it’s ok to ignore it. Basically the core camera script is just freaking out because it doesn’t have a module to handle the Scriptable camera type (which is the whole point).

1 Like

The thing is whenever I get this error, the CFrame of the camera will go back to the players head after the tween finished, although I didn’t script it like that. It’s because whenever I get this error, the cameratype doesn’t change to scriptable even though I scripted it so that it should change to scriptable.