Can't Interact with guis

Changed the Topic, cus it shifted to another problem:

Because I messed up the first time and I didn’t know what to do, I restarted making my game now I got the problem that after the loading screen finishes the main menu won’t be interactable

I disabled that the Character automatically loads, everything works fine from cloning to sounds etc. but the menu isn’t working somehow
Thats my LoadingScreen script right now:

local wfc		=game.WaitForChild
local ffc		=game.FindFirstChild
local player	=game.Players.LocalPlayer
local TweenService		=game:GetService("TweenService")
local UserInputService	=game:GetService("UserInputService")
local Workspace			=game:GetService("Workspace")
local Players			=game:GetService("Players")
local Lighting 			=game:GetService("Lighting")
local ReplicatedFirst	=game:GetService("ReplicatedFirst")
local ReplicatedStorage	=game:GetService("ReplicatedStorage")
local GUIS					=wfc(ReplicatedStorage,"GUIS")
local MainMenu					=wfc(GUIS,"MainMenu")
local StarterGui		=game:GetService("StarterGui")
local StarterPack		=game:GetService("StarterPack")
local StarterPlayer		=game:GetService("StarterPlayer")
local Teams				=game:GetService("Teams")
local SoundService		=game:GetService("SoundService")
local LobbyMusic			=wfc(SoundService,"LobbyMusic")
local LoadingMusic			=wfc(SoundService,"LoadingMusic")
local TextChatService 	=game:GetService("TextChatService")
local PlayerGui			=wfc(player,"PlayerGui")
script.Parent.Parent	=PlayerGui
local LoadingScreen			=wfc(PlayerGui,"LoadingScreen")
local LoadScreenFrame			=wfc(LoadingScreen,"Frame")
local ImgLabel						=wfc(LoadScreenFrame,"ImageLabel")
local Background					=wfc(LoadScreenFrame,"Background")
local LoadingText					=wfc(LoadScreenFrame,"Loading")
local GameTitle						=wfc(LoadScreenFrame,"Title")

GameTitle.TextTransparency = 1

local Img1			="rbxassetid://16342495496"
local Img2			="rbxassetid://16342495759"
local Img3			="rbxassetid://16342495223"
local Img4			="rbxassetid://16342495001"
local Img5			="rbxassetid://16342494800"
local Info		=TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, true, 0)
local SNDInfo	=TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0)
local Tween 	=TweenService:Create(ImgLabel, TweenInfo.new(20, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, -1, false), {Rotation = -360})
local LMusic 	=TweenService:create(LoadingMusic, TweenInfo.new(50), {Volume = .5})
Tween:Play()
LMusic:Play()
LoadingMusic:Play()

local function updateLoadingText()
	while true do
		LoadingText.Text = "Loading"
		wait(0.5)
		LoadingText.Text = "Loading ."
		wait(0.5)
		LoadingText.Text = "Loading . ."
		wait(0.5)
		LoadingText.Text = "Loading . . ."
		wait(0.5)
	end
end
spawn(updateLoadingText)
local function FadeInOut()
	local Tween				=TweenService:Create(Background, Info, {ImageTransparency = 0})
	Tween:Play()
	Tween.Completed:Wait()
	local Tween				=TweenService:Create(Background, Info, {ImageTransparency = 1})
	Tween:Play()
	wait(.1)
end
local function FadeGameTitle()
	local Tween				=TweenService:Create(GameTitle, Info, {TextTransparency = 0})
	Tween:Play()
	Tween.Completed:Wait()
	local Tween				=TweenService:Create(GameTitle, Info, {TextTransparency = 1})
	Tween:Play()
end
local function CloneGUIS()
	MainMenu.Enabled = true
	for i,v in pairs(GUIS:GetChildren()) do
		v.Parent = StarterGui
		v:Clone().Parent= PlayerGui
	end
end

Background.Image = Img1
FadeInOut()
Background.Image = Img2
FadeInOut()
Background.Image = Img3
FadeInOut()
Background.Image = Img4
FadeInOut()
Background.Image = Img5
spawn(FadeGameTitle)
FadeInOut()
spawn(CloneGUIS)

for i,v in pairs (LoadingScreen:GetDescendants()) do
	if v:IsA("ImageLabel") then
		local Tween	=TweenService:Create(v, SNDInfo, {BackgroundTransparency = 1, ImageTransparency = 1})

		Tween:Play()
	elseif v:IsA("TextLabel") then
		local Tween	=TweenService:Create(v, SNDInfo, {BackgroundTransparency = 1, TextTransparency = 1})
		Tween:Play()
	elseif v:IsA("Frame") then
		local Tween	=TweenService:Create(v, SNDInfo, {BackgroundTransparency = 1})
		Tween:Play()
	elseif v:IsA("UIStroke") then
		local Tween =TweenService:Create(v, SNDInfo, {Transparency = 1})
	Tween:Play()
	end
end

repeat wait() until Background.ImageTransparency == 1 and LoadingText.TextTransparency == 1

if LoadingMusic.Volume > 0 then
	local LMusic = TweenService:create(LoadingMusic, TweenInfo.new(5), {Volume = 0})
	LMusic:Play()
	LMusic.Completed:Wait()
	LoadingMusic:Destroy()
end

local LMT = TweenService:create(LobbyMusic, TweenInfo.new(100), {Volume = 10})
LMT:Play()
LobbyMusic:Play()
wait(5)
script.Parent:Destroy()

The Menu Gui is stored in Replicated Storage
And the Loading Gui is in Replicated First

ScreenGui’s Properties → Tick off ResetOnSpawn
image

Sorry for the late reply, the problem is it is already ticked off, but as the GUI loads each time the player character is added it won’t change anything

Where is the script itself? segergerhwsrthtaws4htae

The script right now is in StarterGUI

If it’s not under any ScreenGui with ResetOnSpawn set to false then the problem is that the script is being reloaded every time a player spawns. You need to move the script to the other place. For example, under your ScreenGui with ResetOnSpawn set to false

Edit: if you want to use this script when a player initially joins in without spawning then I suggest to put this script into StarterPlayer.StarterPlayerScripts and put your ScreenGui in ReplicatedStorage. In the beggining of the code, we can define PlayerGui and put a ScreenGui ourselves

local player = game:GetService('Players').LocalPlayer
local screenGui = game:GetService('ReplicatedStorage'):WaitForChild('ScreenGui')
local plrGui = player:WaitForChild('PlayerGui')
screenGui.Parent = plrGui

-- the rest of the code

This way we don’t need to wait for the first character spawn to get the ScreenGui to work

check to see if there is a script re-enabling the gui and just tell it not to once the reset function is toggled off

My guess it’s because of this function, why not put the MainMenu.Enabled at the top of the script (outside of the function)? So it avoids always calling the function and enabling it

Because I messed up the first time and I didn’t know what to do, I restarted making my game now I got the problem that after the loading screen finishes the main menu won’t be interactable

I disabled that the Character automatically loads, everything works fine from cloning to sounds etc. but the menu isn’t working somehow
Thats my LoadingScreen script right now:

local wfc		=game.WaitForChild
local ffc		=game.FindFirstChild
local player	=game.Players.LocalPlayer
local TweenService		=game:GetService("TweenService")
local UserInputService	=game:GetService("UserInputService")
local Workspace			=game:GetService("Workspace")
local Players			=game:GetService("Players")
local Lighting 			=game:GetService("Lighting")
local ReplicatedFirst	=game:GetService("ReplicatedFirst")
local ReplicatedStorage	=game:GetService("ReplicatedStorage")
local GUIS					=wfc(ReplicatedStorage,"GUIS")
local MainMenu					=wfc(GUIS,"MainMenu")
local StarterGui		=game:GetService("StarterGui")
local StarterPack		=game:GetService("StarterPack")
local StarterPlayer		=game:GetService("StarterPlayer")
local Teams				=game:GetService("Teams")
local SoundService		=game:GetService("SoundService")
local LobbyMusic			=wfc(SoundService,"LobbyMusic")
local LoadingMusic			=wfc(SoundService,"LoadingMusic")
local TextChatService 	=game:GetService("TextChatService")
local PlayerGui			=wfc(player,"PlayerGui")
script.Parent.Parent	=PlayerGui
local LoadingScreen			=wfc(PlayerGui,"LoadingScreen")
local LoadScreenFrame			=wfc(LoadingScreen,"Frame")
local ImgLabel						=wfc(LoadScreenFrame,"ImageLabel")
local Background					=wfc(LoadScreenFrame,"Background")
local LoadingText					=wfc(LoadScreenFrame,"Loading")
local GameTitle						=wfc(LoadScreenFrame,"Title")

GameTitle.TextTransparency = 1

local Img1			="rbxassetid://16342495496"
local Img2			="rbxassetid://16342495759"
local Img3			="rbxassetid://16342495223"
local Img4			="rbxassetid://16342495001"
local Img5			="rbxassetid://16342494800"
local Info		=TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, true, 0)
local SNDInfo	=TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0)
local Tween 	=TweenService:Create(ImgLabel, TweenInfo.new(20, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, -1, false), {Rotation = -360})
local LMusic 	=TweenService:create(LoadingMusic, TweenInfo.new(50), {Volume = .5})
Tween:Play()
LMusic:Play()
LoadingMusic:Play()

local function updateLoadingText()
	while true do
		LoadingText.Text = "Loading"
		wait(0.5)
		LoadingText.Text = "Loading ."
		wait(0.5)
		LoadingText.Text = "Loading . ."
		wait(0.5)
		LoadingText.Text = "Loading . . ."
		wait(0.5)
	end
end
spawn(updateLoadingText)
local function FadeInOut()
	local Tween				=TweenService:Create(Background, Info, {ImageTransparency = 0})
	Tween:Play()
	Tween.Completed:Wait()
	local Tween				=TweenService:Create(Background, Info, {ImageTransparency = 1})
	Tween:Play()
	wait(.1)
end
local function FadeGameTitle()
	local Tween				=TweenService:Create(GameTitle, Info, {TextTransparency = 0})
	Tween:Play()
	Tween.Completed:Wait()
	local Tween				=TweenService:Create(GameTitle, Info, {TextTransparency = 1})
	Tween:Play()
end
local function CloneGUIS()
	MainMenu.Enabled = true
	for i,v in pairs(GUIS:GetChildren()) do
		v.Parent = StarterGui
		v:Clone().Parent= PlayerGui
	end
end

Background.Image = Img1
FadeInOut()
Background.Image = Img2
FadeInOut()
Background.Image = Img3
FadeInOut()
Background.Image = Img4
FadeInOut()
Background.Image = Img5
spawn(FadeGameTitle)
FadeInOut()
spawn(CloneGUIS)

for i,v in pairs (LoadingScreen:GetDescendants()) do
	if v:IsA("ImageLabel") then
		local Tween	=TweenService:Create(v, SNDInfo, {BackgroundTransparency = 1, ImageTransparency = 1})

		Tween:Play()
	elseif v:IsA("TextLabel") then
		local Tween	=TweenService:Create(v, SNDInfo, {BackgroundTransparency = 1, TextTransparency = 1})
		Tween:Play()
	elseif v:IsA("Frame") then
		local Tween	=TweenService:Create(v, SNDInfo, {BackgroundTransparency = 1})
		Tween:Play()
	elseif v:IsA("UIStroke") then
		local Tween =TweenService:Create(v, SNDInfo, {Transparency = 1})
	Tween:Play()
	end
end

repeat wait() until Background.ImageTransparency == 1 and LoadingText.TextTransparency == 1

if LoadingMusic.Volume > 0 then
	local LMusic = TweenService:create(LoadingMusic, TweenInfo.new(5), {Volume = 0})
	LMusic:Play()
	LMusic.Completed:Wait()
	LoadingMusic:Destroy()
end

local LMT = TweenService:create(LobbyMusic, TweenInfo.new(100), {Volume = 10})
LMT:Play()
LobbyMusic:Play()
wait(5)
script.Parent:Destroy()

The Menu Gui is stored in Replicated Storage
And the Loading Gui is in Replicated First

Because I used this function to enable the menu if the player dies