I have a CameraPart as a camera, and a local script in StarterGui
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Camera = workspace.CurrentCamera
function onCutscene()
wait(19)
repeat wait()
Camera.CameraType = Enum.CameraType.Scriptable
until Camera.CFrame == workspace.CameraPart.CFrame
Camera.CFrame = workspace.CameraPart.CFrame
end
onCutscene()
And inside CameraPart, I have a script
CameraPart = script.Parent
function onCutscene()
wait(19)
for i = 1, 2000 do
CameraPart.Position.Y = CameraPart.Position.Y + 0.2
wait(0.01)
end
end
onCutscene()
My intention is after 19 seconds, the camera's position will the CameraPart's position and it will go forward for 20 seconds, sort of like a cutscene. What are my errors and how can I correct them? Thanks in advance.

4 comments
I think Scriptable makes the camera not move at all, it will just stay in one position. I corrected it and the camera didn't move, maybe I need to make the camera not scriptable and program it such that the player couldn't move the camera?
No, the camera would be moveble, just not for the player, I think your mistake is that you set the cframe so it won't folow the part, you should repeatly setting the CFrame until the animation is done
I've corrected that by calling another function that makes the camera follow the part yet the part doesn't move. What is the error in the 2nd script?
Nvm, I put both 2nd and 1st script into one function, it worked. Thanks!