Why am I having an infinite yield?

The class that I’m calling for some reason always has an infinite yield, I’m not sure what the issue is, because I looked at ServerScriptService and the folder is there. What do I do?

 13:32:25.779  Infinite yield possible on 'ServerScriptService:WaitForChild("CutsceneServer")
local Camera = game.Workspace.Camera
local CutsceneEvent = game.ReplicatedStorage.CutsceneEvent
local ReturnEvent = game.ReplicatedStorage.ReturnEvent

local CutsceneScript = game:GetService("ServerScriptService"):WaitForChild("CutsceneServer"):WaitForChild("Cutscene")

local CameraModule = CutsceneScript:WaitForChild("CameraModule")

local TweenService = game:GetService("TweenService")
local Info = TweenInfo.new(2, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut, 0, false, 0)

	Camera.CameraType = Enum.CameraType.Scriptable
	TweenService:Create(Camera, Info, {CFrame = CamCFrame}):Play()

	Camera.CameraType = Enum.CameraType.Custom
1 Like

You can’t access things that are in the server from the client. Place the folder in ReplicatedStorage instead.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.