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

Why wont the Camera to to my desired CFrame Value?

So I'm trying to make the Camera move to a Parts CFrame. Though instead of doing that it just moves 100+ studs away. My game is 99% terrain(Not sure if that helps). Any and all help is welcome.

game:GetService("UserInputService").InputBegan:connect(function(Input)
	local Player = game:GetService("Players").LocalPlayer
	if
		Input.KeyCode == Enum.KeyCode.Q then
		script.Parent.TextLabel:Destroy()
		
		Player.Character.Torso.CFrame = workspace.TorsoPos.CFrame
		
		--Camera
		workspace.CurrentCamera.CameraSubject = workspace
		workspace.CurrentCamera.Focus = workspace.One.CFrame
		workspace.CurrentCamera.HeadLocked = false
		workspace.CurrentCamera.CFrame = workspace.One.CFrame
		game:GetService("StarterPlayer").CameraMode = Enum.CameraMode.Classic
		
		workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
	end
end)

1 answer

✓ Accepted answer

Set the player's Current Camera to Scriptable instead.

workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable

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