So basically I made a cutscene script that is supposed to work. I always get this error: "PartA is not valid member of Model". PartA is member of that model but still, it doesn't work. Anyone know why?
wait(1)
local TweenService = game:GetService("TweenService")
local Camera = game.Workspace.CurrentCamera
local function MoveCamera(StartPart, EndPart, Duration, EasingStyle, EasingDirection)
Camera.CameraType = Enum.CameraType.Scriptable
Camera.CFrame = StartPart.CFrame
local Cutscene = TweenService:Create(Camera, TweenInfo.new(Duration, EasingStyle, EasingDirection), {CFrame = EndPart.CFrame})
Cutscene:Play()
wait(Duration)
end
local function Cutscene()
MoveCamera(game.Workspace.CutScene.PartA, game.Workspace.CutScene.PartB, 1.5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
wait(.5)
Camera.CameraType = Enum.CameraType.Custom
Camera.CameraSubject = game.Players.LocalPlayer.Character:WaitForChild("Humanoid")
end
Cutscene()

2 comments
Make sure that you name the Part right.
Oh right I forgot, you should use WaitForChild() . Because maybe the PartA isn't replicate to the client yet. https://developer.roblox.com/en-us/api-reference/function/Instance/WaitForChild