Hey guys. I'm making a cutscene script from Alvin_blox. Credits to him!

Anyways, I have my scirpt in Starter gui, but when I test the cutscene, it says " Camera1 is not a valid member of Workspace"

Here's the Script:

`local TweeenService = game:GetService("TweenService")

local camera = game.Workspace.Camera

local cutsceneTime = 10 local tweenInfo = TweenInfo.new( cutsceneTime, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0, false, 0

)

function tween(part1,part2) camera.CameraType = Enum.CameraType.Scriptable camera.CFrame = part1.CFrame

local tween = TweeenService:Create(camera, tweenInfo, {CFrame = part2.CFrame})
tween:Play()

wait(cutsceneTime)
camera.CameraType = Enum.CameraType.Custom

end

wait(2)

tween(game.Workspace.Camera1,game.Workspace.Camera2) tween(game.Workspace.Camera2,game.Workspace.Camera3) tween(game.Workspace.Camera3,game.Workspace.Camera4)`

If you find the problem, thank you!

1 comment

0

Try doing :WaitForChild on the cameras. Maybe the script has loaded in before the parts do. Ex: game.Workspace:WaitForChild("Camera1")