Hello scripters!
I am trying to choose de CurrentCamera State Type, more the camera doesn’t change the StateType, I already looked in the game’s output, I tried to look in the devforum and it didn’t come up with anything.
I’ll make a Local Script in the StarterPlayerScripts.
– Local script in StarterPlayerScripts
local camera = game.Workspace.CurrentCamera
if camera then
camera.CameraType = Enum.CameraType.Scriptable
camera.CameraSubject = nil
end
local RunService = game:GetService("RunService")
local camera = game.Workspace.CurrentCamera
if camera then
repeat
RunService.Heartbeat:Wait()
camera.CameraType = Enum.CameraType.Scriptable
until camera.CameraType == Enum.CameraType.Scriptable
end
local RunService = game:GetService("RunService")
-- choose either Heartbeat or RenderStepped
(RunService.Heartbeat or RunService.RenderStepped):Connect(function(_)
camera.CameraType = Enum.CameraType.Scriptable
...
end)
One thing, too; I did say to choose either Heartbeat or RenderStepped, since it shouldn’t be in parenthesis. An actual example of this script would be more like this:
local RunService = game:GetService("RunService")
RunService.RenderStepped:Connect(function(_)
camera.CameraType = Enum.CameraType.Scriptable
end)