Hello! I was making a cutscene script for one of my games when the module responsible for the cutscene failed, and I found out it cannot find any instance.
Heres the module: It is placed in ServerScriptService and is runned via Server Script.
local module = {}
local cutsceneStuff = game.ReplicatedStorage.CutsceneStuff
local remotes = game.ReplicatedStorage.Remotes
function module.loadCutscene(player: Player, map)
print(map:GetDescendants())
cutsceneStuff.BlackScreen:FireAllClients(TweenInfo.new(0.001), 0)
player.Character:PivotTo(map.Cutscene.PlayerSpawn.CFrame)
cutsceneStuff.StartCutscene:FireAllClients(map.Cutscene.CamParts:WaitForChild("CamPart1"))
wait(.5)
cutsceneStuff.BlackScreen:FireAllClients(TweenInfo.new(1, Enum.EasingStyle.Sine), 1)
cutsceneStuff.SetMusic:FireAllClients(script:WaitForChild("Suspense").SoundId)
wait(1)
remotes.Dialog:FireAllClients(player.DisplayName, "I'm out of fuel and I got the signal here.", Color3.fromRGB(211, 211, 211), 0.03, 3)
wait(3.1)
remotes.Dialog:FireAllClients(player.DisplayName, "I hope I find that person and a gas can here.", Color3.fromRGB(211, 211, 211), 0.03, 2)
wait(2.1)
remotes.Dialog:FireAllClients(player.DisplayName, "But how am I supposed to enter? Isn't that trespassing?", Color3.fromRGB(211, 211, 211), 0.03, 3)
cutsceneStuff.MoveCamera:FireAllClients(map.Cutscene.CamParts:WaitForChild("CamPart2"), TweenInfo.new(1.5, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut))
wait(3.1)
cutsceneStuff.MoveCamera:FireAllClients(map.Cutscene.CamParts:WaitForChild("CamPart3"), TweenInfo.new(1.5, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut))
wait(2)
remotes.Dialog:FireAllClients(player.DisplayName, "Oh. I can go through the sewers. I hope it doesnt turn out bad.", Color3.fromRGB(211, 211, 211), 0.03, 1)
wait(1.1)
remotes.Dialog:FireAllClients(player.DisplayName, "Here we go.", Color3.fromRGB(211, 211, 211), 0.03, 1)
cutsceneStuff.SetFOV:FireAllClients(80, TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut))
wait(1.1)
cutsceneStuff.BlackScreen:FireAllClients(TweenInfo.new(1, Enum.EasingStyle.Sine), 0)
cutsceneStuff.EndCutscene:FireAllClients()
end
return module
I would appreciate your help! Feel free to ask questions, I will try my best to reply.
And also, it can still detect the remotes, it just does not detect instances inside map variable.