Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Camera can be manipulated, but it will not change its CFrame in a coroutine (?)

I have a camera that is being moved using TweenService while the player is on the join menu. I have changed the camera to Scriptable, but it will only get moved by the tween, not by setting the CFrame. This is bad because the players all spawn under the map and the camera not starting at the desired position is bad.

Snippet 1:

function CameraController()
	camera.CameraType = "Scriptable"
	
	while playerCam == false do
		camera.CFrame = defaultCamCFrame
		
		cameraOneManipulation:Play()
		wait(4.7)
	
		fade:Play()
		
		wait(0.45)
		
	end
	
	camera.CameraType = "Custom"
	
end

local CCC = coroutine.wrap(CameraController)

Snippet 2:

local playerCam = false

local camera = workspace.CurrentCamera

local defaultCamCFrame = CFrame.new(10, 10, 10)

I am new to camera manipulation and GUIs, so sorry if it is a stupid mistake.

1 answer

Snippet 1:

function CameraController()
    camera.CameraType = Enum.CameraType.Scriptable

    while playerCam == false do
        camera.CFrame = defaultCamCFrame

        cameraOneManipulation:Play()
        wait(4.7)

        fade:Play()

        wait(0.45)

    end

    camera.CameraType = "Custom"

end

local CCC = coroutine.wrap(CameraController)

Snippet 2:

local playerCam = false

local camera = workspace.CurrentCamera

local defaultCamCFrame = CFrame.new(10, 10, 10)

2 comments

0

Thanks

0

Np

This discussion is preserved as it was. New answers, comments, and votes are closed.