I need scripting help for intro

I made an intro loading script and used game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.All, false), but I can still see other GUIs while the intro is loading i don’t understand why can someone fix this?

local player = game.Players.LocalPlayer
local replicatedFirst = game:GetService("ReplicatedFirst")
local playerGui = player:WaitForChild("PlayerGui")

-- Find and clone the GUI in ReplicatedFirst
local introGui = replicatedFirst:WaitForChild("IntroGui"):Clone()
introGui.Parent = playerGui

-- Find the Frame and TextLabel
local frame = introGui:WaitForChild("Frame")
local textLabel = frame:WaitForChild("TextLabel")
local sound = introGui:WaitForChild("Sound")

-- Disable Core GUI elements
local function disableCoreGui()
	game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
end

-- Enable Core GUI elements
local function enableCoreGui()
	game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.All, true)
end

-- Function to update the loading status
local function yuklemeDurumuGuncelle()
	for i = 0, 239 do
		textLabel.Text = "Loading Assets " .. i .. "/239"
		wait(0.01)  -- Simulate loading time
	end
end

-- Function to simulate game loading completion
local function oyunYuklendi()
	textLabel.Text = "DONE!"
	wait(2)  -- Display the DONE! message for 2 seconds
	sound:Stop()
	introGui.Enabled = false  -- Disable the Intro GUI
	enableCoreGui()  -- Re-enable Core GUI elements
end

-- Simulate game loading
local function baslat()
	disableCoreGui()  -- Disable Core GUI elements
	yuklemeDurumuGuncelle()
	oyunYuklendi()
end

-- Check if the intro has been shown before
local function introGosterildiMi()
	local key = "IntroGosterildi"
	if player:GetAttribute(key) then
		return true
	else
		player:SetAttribute(key, true)
		return false
	end
end

-- Start if the intro has not been shown before
if not introGosterildiMi() then
	introGui.Enabled = true  -- Enable the Intro GUI
	sound:Play()
	baslat()
else
	introGui.Enabled = false  -- Disable the GUI immediately if it has been shown before
end

-- Prevent the GUI from reappearing when the player respawns
player.CharacterAdded:Connect(function()
	if introGosterildiMi() then
		introGui.Enabled = false
	end
end)

You need to run the :SetCoreGui in ReplicatedFirst

Only the Roblox icon and hamburger menu are visible, right?

yes, the chat button is gone but the other screenguis is still visible

1 Like

I don’t think you can hide the Roblox button though

I didn’t try to hide the Roblox button i just wanted to hide the GUIs in the StarterGui while the intro was loading but I don’t know much about UI scripting and that’s a problem for me

1 Like

It’s because you are only hiding Roblox’s GUIs . You would have to reference your GUIs from the player or player gui

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.