Thing in Workspace is not existing?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    Me and my sister are making a Piggy game, and are making a cutscene for Chapter 2.
  2. What is the issue? Include screenshots / videos if possible!
    image
    This error saying that the model which holds all of the Camera Parts doesn’t exist. It clearly exists though: image
    Here’s the cutscene code:
local function ToggleGuis(bool)
	for i, v in pairs(script.Parent:GetChildren()) do
		if v:IsA("ScreenGui") then
			v.Enabled = bool
		end
	end
end
local cam = workspace.CurrentCamera
local TS = game:GetService("TweenService")
local tweeninfo = TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false)
ToggleGuis(false)
print("Hello world")

repeat wait()
	cam.CameraType = Enum.CameraType.Scriptable
until cam.CameraType == Enum.CameraType.Scriptable
print(workspace.Chap2BegCutscene.Name)
cam.CFrame = workspace.Chap2BegCutscene.CamPart1.CFrame
wait(5)
local tween1 = TS:Create(cam, tweeninfo, {CFrame = workspace.Chap2BegCutscene.CamPart2.CFrame})
tween1:Play()
wait(2)
local tween2 = TS:Create(cam, tweeninfo, {CFrame = workspace.Chap2BegCutscene.CamPart3.CFrame})
tween2:Play()
wait(5)
local fade = game.ReplicatedStorage.Fade:Clone()
fade.Parent = script.Parent
local obj = fade:WaitForChild("Obj")
for i=1,10 do
	obj.BackgroundTransparency = obj.BackgroundTransparency - 0.1
	wait(0.05)
end
wait(3)
fade:Destroy()
cam.CameraType = Enum.CameraType.Custom
cam.CameraSubject = game.Players.LocalPlayer.Character:WaitForChild("Humanoid")
game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(1235.173, 4, 1121.787)
ToggleGuis(true)
script:Destroy()

Thanks!

Instead of this:

Try this:
cam.CFrame = workspace:WaitForChild("Chap2BegCutscene").CamPart1.CFrame

1 Like

image
The script is still not finding it. I swear it exists!

Could you send a full screenshot of the explorer? Also make sure everything is anchored

1 Like

Do you have StreamingEnabled on?

The client may not have access to everything in workspace if this setting is on (the server will see everything fine though).

Ah, the CamParts were CanCollide = false and they fell to their doom lol.

2 Likes