Hi! So i was trying to add an main menu after my custom loading screen was gone. I tried to do this in 2 different variants, one was to try and set the bool value to true and then in the main menu gui script add
local loadingDone = game.ReplicatedStorage.loadingScreenDone
if loadingDone.Value == true then
script.Parent.MainFrame.Visible = true
script.Parent.background.Visible = true
end
and when i tried to enable it manually it worked! So the script in the gui works! But when i try to enable it through the LoadingScreen Script it doesnt work! Here's my LoadingScreenManager
local Players = game:GetService("Players")
local ReplicatedFirst = game:GetService("ReplicatedFirst")
local TweenService = game:GetService("TweenService")
loadingDone = game.ReplicatedStorage:GetChildren("loadingScreenDone")
local player = Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
-- Create a basic loading screen
local screenGui = Instance.new("ScreenGui")
screenGui.IgnoreGuiInset = true
local textLabel = Instance.new("TextLabel")
textLabel.Size = UDim2.new(1, 0, 1, 0)
textLabel.BackgroundColor3 = Color3.fromRGB(0, 20, 40)
textLabel.Font = Enum.Font.GothamSemibold
textLabel.TextColor3 = Color3.new(0.8, 0.8, 0.8)
textLabel.Text = "Loading..."
textLabel.TextSize = 28
textLabel.Parent = screenGui
local loadingRing = Instance.new("ImageLabel")
loadingRing.Size = UDim2.new(0, 256, 0, 256)
loadingRing.BackgroundTransparency = 1
loadingRing.Image = "rbxassetid://4965945816"
loadingRing.AnchorPoint = Vector2.new(0.5, 0.5)
loadingRing.Position = UDim2.new(0.5, 0, 0.5, 0)
loadingRing.Parent = screenGui
-- Parent entire screen GUI to player GUI
screenGui.Parent = playerGui
-- Remove the default loading screen
ReplicatedFirst:RemoveDefaultLoadingScreen()
local tweenInfo = TweenInfo.new(4, Enum.EasingStyle.Linear, Enum.EasingDirection.In, -1)
local tween = TweenService:Create(loadingRing, tweenInfo, {Rotation=360})
tween:Play()
wait(6) -- Optionally force screen to appear for a minimum number of seconds
loadingDone.Value = true
wait(1)
screenGui:Destroy()
the part where the bool value is:
loadingDone = game.ReplicatedStorage:GetChildren("loadingScreenDone")
and
loadingDone.Value = true
Also the 2 variant was to get the mainframe from the mainmenu and make it visible.
Please help!
Also dont judge me because i used the "roblox loading screen template"

2 comments
Are you using a local or server script?
local script