Script not working

1st Local Script
local InfluenzaA = script.Parent.InfluenzaA
local InfluenzaB = script.Parent.InfluenzaB
local InfluenzaC = script.Parent.InfluenzaC

InfluenzaA.MouseButton1Click:Connect(function()
	game.StarterGui.e.Enabled = false
wait(1)
	game.StarterGui.LoadingGUI.Enabled = true
end)

InfluenzaB.MouseButton1Click:Connect(function()
	game.StarterGui.e.Enabled = false
	wait(1)
	game.StarterGui.LoadingGUI.Enabled = true
end)

InfluenzaC.MouseButton1Click:Connect(function()
	game.StarterGui.e.Enabled = false
	wait(1)
	game.StarterGui.LoadingGUI.Enabled = true
end)
2nd Local Script
local TweenService = game:GetService("TweenService")
local LoadingRing = script.Parent.LoadingScreen.LoadingRing
local LoadingText = script.Parent.LoadingScreen.LoadingText


local tweenInfo = TweenInfo.new(4, Enum.EasingStyle.Linear, Enum.EasingDirection.In, -1)
local tween = TweenService:Create(LoadingRing, tweenInfo, {Rotation=360})
tween:Play()


LoadingText.Text = "Loading."
wait(1)
LoadingText.Text = "Loading.."
wait(1)
LoadingText.Text = "Loading..."
wait(1)
script.Parent.LoadingScreen:Destroy()

Basically, when I click the gui in the 1st Local Script, it will disable the ScreenGUI and go to the LoadingGUI.

But it doesn’t work, no errors.

1 Like

try use visible instead of using enabled

1 Like

Here is the example:

local InfluenzaA = script.Parent.InfluenzaA
local InfluenzaB = script.Parent.InfluenzaB
local InfluenzaC = script.Parent.InfluenzaC

InfluenzaA.MouseButton1Click:Connect(function()
	game.StarterGui.e.Visible = false
wait(1)
	game.StarterGui.LoadingGUI.Visible = true
end)

InfluenzaB.MouseButton1Click:Connect(function()
	game.StarterGui.e.Visible = false
	wait(1)
	game.StarterGui.LoadingGUI.Visible = true
end)

InfluenzaC.MouseButton1Click:Connect(function()
	game.StarterGui.e.Visible = false
	wait(1)
	game.StarterGui.LoadingGUI.Visible = true
end)
1 Like

There isn’t a Visible property in ScreenGUI’s.

can i see the explorer so i can know what to do

This is e.
image

image
LoadingGUI.

Changes from StarterGui will not replicate to the LocalPlayer’s PlayerGui. You should instead index Player.PlayerGui to perform changes to GuiObjects.

local Client = game:GetService("Players").LocalPlayer
local PlayerGui = Client.PlayerGui

-- do this with all of them
PlayerGui:WaitForChild("LoadingGUI").Enabled = true

By the way, instead of doing this I’d recommend just using a for loop.

for i = 1, 3 do
	LoadingText.Text = LoadingText.Text:gsub("%.", "..", 1)
	task.wait(1)
end

@Sarchyx Others works, but the TweenService doesn’t work.

How would I make it so when you click it and it will play the tween?

Cause like, before I click it, I am pretty sure the tween has already played even though it’s not enabled.

Also, this doesn’t work. needed more words

image

local InfluenzaA = script.Parent.TextButton1
local InfluenzaB = script.Parent.TextButton2
local InfluenzaC = script.Parent.TextButton3

InfluenzaA.MouseButton1Click:Connect(function()
	script.Parent.Parent.Parent.Visible = false
	wait(1)
	script.Parent.Parent.Parent.Parent.LoadingScreen.Visible = true
end)

InfluenzaB.MouseButton1Click:Connect(function()
	script.Parent.Parent.Parent.Visible = false
	wait(1)
	script.Parent.Parent.Parent.Parent.LoadingScreen.Visible = true
end)

InfluenzaC.MouseButton1Click:Connect(function()
	script.Parent.Parent.Parent.Visible = false
	wait(1)
	script.Parent.Parent.Parent.Parent.LoadingScreen.Visible = true
end)

try put the gui like i do and use the changed script also remmeber change the Local thingy
it work for me when i press the button