How come my camera changing script isnt working

local function timer()
	for i=5,0,-1 do
		task.wait(1)
	end
	debounce = true
end

task.spawn(timer)
		while debounce == false do
			task.wait()
			game.Workspace.CurrentCamera.CFrame = game.Workspace.CurrentNuke.Airplane.CFrame + Vector3.new(0,6,0)
		end

hey I have this script that follows an airplane however its not doing it correctly and it’s just sitting in one spot. (This is inside a remote event on the client and the plane is moved via a tween on the server)

Try this:

local camera = workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = workspace.CAM1.CFrame

Yea I did that but is there anyway i can make the player be able to move their camera?

I’m sorry, what are you trying to achieve by this?

It seems like you can use the default camera for this, unless I am mistaken.

What is your purpose in doing this?

local function timer()
	for i=5,0,-1 do
		task.wait(1)
	end
	debounce = true
end

task.spawn(timer)
		while debounce == false do
			task.wait()
			game.Workspace.CurrentCamera.CFrame = game.Workspace.CurrentNuke.Airplane.CFrame + Vector3.new(0,6,0)
		end

hey I have this script that follows an airplane however its not doing it correctly and it’s just sitting in one spot. (This is inside a remote event on the client and the plane is moved via a tween on the server)

Make the cameratype scriptable.

1 Like