You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I want to make my loading screen gui work for Kings Landing… -
What is the issue? Include screenshots / videos if possible!
Loading won’t work alongside the cutscene, and no one is willing to help me fix my loadlibrary cutscene part in the script as well… -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I’ve tried HttpService for Cutscene script, and rbx utility and so on… but no work, and there isn’t an error or an issue within the LocalScript for the LoadingScreen Menu gui.
Script:
local Player = game.Players.LocalPlayer
local PlayerGui = Player:WaitForChild("PlayerGui")
repeat wait() until Player.PlayerGui:FindFirstChild("ControlGui")
Player.PlayerGui.ControlGui.BottomLeftControl.Visible = false
local Interface = PlayerGui:WaitForChild("Interface")
Interface.Enabled = false
PlayerGui:SetTopbarTransparency(0)
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All,false)
local CutsceneScript = script:WaitForChild("CutsceneScript")
CutsceneScript.Parent = PlayerGui
local Blur = Instance.new("BlurEffect",game.Lighting)
Blur.Size = 15
local LoadingScreen = script.Parent
local MainFrame = LoadingScreen:WaitForChild("MainFrame")
MainFrame.Visible = true
local LoadBarHolder = MainFrame:WaitForChild("LoadBarHolder")
local LoadBar = LoadBarHolder:WaitForChild("LoadBar")
local LoadingText = MainFrame:WaitForChild("LoadingText")
local GameNameText = MainFrame:WaitForChild("LoadingGameName")
local Music = LoadingScreen:WaitForChild("Music")
local Menu = LoadingScreen:WaitForChild("Menu")
local PlayButton = Menu:WaitForChild("PlayButton")
local GameMusic = workspace:WaitForChild("Mechanics"):WaitForChild("Sounds"):WaitForChild("Music")
GameMusic.Volume = 0
local LoadTime = 45
LoadBar:TweenSize(UDim2.new(1,0,1,0),"Out","Quad",LoadTime)
wait(LoadTime)
for i = 0,1,.1 do
LoadingText.TextTransparency = i
wait(.01)
end
LoadingText.Text = "- Loaded -"
for i = 1,0,-.1 do
LoadingText.TextTransparency = i
wait(.01)
end
for i,v in pairs(MainFrame:GetChildren())do
if v.Name ~= "LoadingGameName" then
if v.Name == "LoadingText" then
v:TweenPosition(UDim2.new(v.Position.X.Scale,v.Position.X.Offset,-1,0),"Out","Quad",2)
else
v:TweenPosition(UDim2.new(v.Position.X.Scale,v.Position.X.Offset,1.5,0),"Out","Quad",2)
end
end
end
for i = 0,1,.1 do
GameNameText.TextTransparency = i
wait(.01)
end
GameNameText.Text = "Welcome to King's Landing!"
for i = 1,0,-.1 do
GameNameText.TextTransparency = i
wait(.01)
end
wait(3)
CutsceneScript.Disabled = false
for i = 0,1,.1 do
GameNameText.TextTransparency = i
wait(.01)
end
Music:Play()
wait(.2)
MainFrame.Visible = false
Menu.Visible = true
wait(5)
Menu.PlayButton.Visible = true
for i = 1,0,-.01 do
Menu.PlayButton.TextTransparency = i
Menu.PlayButton.BackgroundTransparency = i
end
PlayButton.MouseButton1Down:connect(function()
local Camera = game.Workspace.CurrentCamera
Menu:TweenPosition(UDim2.new(.5,0,-1,0),"Out","Quad",2)
wait(2.5)
Blur:Destroy()
CutsceneScript:Destroy()
Camera.CameraType = Enum.CameraType.Custom
Camera.CameraSubject = Player.Character.Humanoid
Camera.FieldOfView = 70
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack,true)
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Health,true)
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat,true)
PlayerGui:SetTopbarTransparency(.5)
for i = 1,0,-.01 do
Music.Volume = i
wait(.01)
end
for i = 0, .2,.01 do
GameMusic.Volume = i
wait(.01)
end
wait(1)
LoadingScreen:Destroy()
Interface.Enabled = true
end)