-- Services
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerStorage = game:GetService("ServerStorage")
local CutsceneEvent = ReplicatedStorage:WaitForChild("CutsceneEvent")
local player = game.Players.LocalPlayer
-- Optional: Replace objects with dynamic ones (e.g., player character)
local character = player.Character
-- MoonAnimator2 Module
local moon2Cutscene = require(ReplicatedStorage:WaitForChild("Moon2Cutscene"))
-- Cutscene File and Map (folder with objects)
local file = ReplicatedStorage.Briefing -- Cutscene file
local mapClone = nil -- Placeholder for the cloned map
-- Function to play the cutscene
local function playCutscene(player)
-- Clone the cutscene folder from ReplicatedStorage to Workspace
if not mapClone then
local map = ReplicatedStorage:WaitForChild("Cutscene") -- Folder containing the cutscene objects in ReplicatedStorage
mapClone = map:Clone() -- Clone it
mapClone.Parent = workspace -- Set the parent to Workspace
end
-- Create the new cutscene instance using the file and the cloned map
local newCutscene = moon2Cutscene.new(file, mapClone)
local newCutscene = moon2Cutscene.new(file)
for i,v in newCutscene.file.Items do
local path = "game"
for i, n in v.Path.InstanceNames do
if i == 1 then continue end
path ..= "."..n
end
print(`[{i}] {path}`)
end
newCutscene:replace(1, game.Workspace.Cutscene.Reggie)
newCutscene:replace(2, game.Workspace.Cutscene.Kate)
newCutscene:replace(3, game.Workspace.Cutscene:FindFirstChild("Matt Graver"))
newCutscene:replace(4, game.Workspace.Cutscene.MissionMan)
newCutscene:replace(5, game.Workspace.Cutscene.Random)
newCutscene:replace(6, game.Workspace.CurrentCamera)
newCutscene:replace(7, game.Workspace.Cutscene.Reggie.Head.Mouth.face2)
newCutscene:replace(8, game.Workspace.Cutscene.Reggie.Head.Eyes.face)
newCutscene:replace(9, game.Workspace.Cutscene.Kate.Head.Eyes.face)
newCutscene:replace(10, game.Workspace.Cutscene.Kate.Head.Mouth.face2)
newCutscene:replace(11, game.Workspace.Cutscene.Random.Head.Eyes.face)
newCutscene:replace(12, game.Workspace.Cutscene.Random.Head.Mouth.face2)
newCutscene:replace(13, game.Workspace.Cutscene.MissionMan.Head.Eyes.face)
newCutscene:replace(14, game.Workspace.Cutscene.MissionMan.Head.Mouth.face2)
newCutscene:replace(15, game.Workspace.Cutscene.MattGraver.Head.Eyes.face)
newCutscene:replace(16, game.Workspace.Cutscene.MattGraver.Head.Mouth.face2)
if character then
-- Pivot the player to the start CFrame if needed
-- Replace the first object in the cutscene with the player's character
newCutscene:replace(1, character)
end
-- Ensure all objects are ready
local canFind, objectMissing = newCutscene:canFindObjects()
if not canFind then
warn("Missing object: ", objectMissing)
end
-- Wait for all objects to be loaded properly
newCutscene:waitForObjects()
-- Play the cutscene
newCutscene:play()
-- Optional: Add effects like fade or vignette if desired F
local fade = moon2Cutscene.Fade(1, 2, 1)
fade()
end
-- Event Listener for triggering the cutscene
CutsceneEvent.OnClientEvent:Connect(function(player)
playCutscene(player)
end)
-- Ensure the script knows the cutscene system is ready
print("Cutscene system initialized.")
I’m still getting the same Warning not error
10:12:40.655 Missing object: {
["Path"] = {
["InstanceNames"] = {
[1] = "game",
[2] = "Workspace",
[3] = "Reggie"
},
["InstanceTypes"] = {
[1] = "DataModel",
[2] = "Workspace",
[3] = "Model"
},
["ItemType"] = "Rig"
}
} - Client - LocalScript:70
^
| That’s the warning I’m getting yet I dont know how to fix it even though I specified it in the local script I have