Part of my UI relies on cutscenes. I tested the UI in a seperate place, where it worked completely fine, and when finished I put it into the main game, however now it doesn’t work and throws errors.
I tested my game for viruses twice, and even then I haven’t even used free models other than a gun kit, and I went through each of my scripts.
I honestly have no idea why this is happening and I’ve been pulling my hair out for about 3 hours trying to figure out why it works in one place and not the other…
In this screenshot, you’ll see it says script ‘Players.FragmentFour.PlayerGui.MenuUi.UiScript, on line 15’
“Scene1-2 is not a valid member of Folder”
However in the following screenshots you’ll see this definitely isnt’ the case.
Here’s my code:
local CamTweenInfo = TweenInfo.new(24, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut, 0, false, 0)
local BackTweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut, 0, false, 0)
local Scene1Anim = TweenService:Create(Camera, CamTweenInfo, {CFrame = MenuCutsceneParts["Scene1-2"].CFrame, Focus = MenuCutsceneParts.Scene1Focus.CFrame})
local Scene2Anim = TweenService:Create(Camera, CamTweenInfo, {CFrame = MenuCutsceneParts["Scene2-2"].CFrame, Focus = MenuCutsceneParts.Scene2Focus.CFrame})
local Scene3Anim = TweenService:Create(Camera, CamTweenInfo, {CFrame = MenuCutsceneParts["Scene3-2"].CFrame, Focus = MenuCutsceneParts.Scene3Focus.CFrame})
local SceneTransition1 = TweenService:Create(UI.Background, BackTweenInfo, {BackgroundTransparency = 0})
local SceneTransition2 = TweenService:Create(UI.Background, BackTweenInfo, {BackgroundTransparency = 0.8})
--// Module Code
Here is where I referenced "MenuCutsceneParts"
local TweenService = game:GetService("TweenService")
local StarterGui = game:GetService("StarterGui")
local PlayerGui = player:WaitForChild("PlayerGui")
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
PlayerGui:SetTopbarTransparency(1)
local UI = script.LoadingUi
UI.Parent = PlayerGui
local Label = UI.TextLabel
repeat wait() until game:IsLoaded()
workspace.Regions.Ambience.Played:Connect(function()
workspace.Regions.Ambience.Volume = 0
workspace.Regions.Ambience:Stop()
end)
local Camera = workspace.CurrentCamera
local MenuCutsceneParts = workspace:WaitForChild("MenuCutsceneParts")