Localscript not changing Transparency of GUI

I was trying to make a virtual operating system game called ShiftOS, the first time I made the startup screen, it worked as intended, but after making a game menu, it started to not work. I couldnt understand what was happening because all it did was enable/disable some scripts, make things less transparent, and play a startup sound I got from Roblox.

Here’s the code:

local logo = script.Parent:WaitForChild("Logo")
local bar = script.Parent:WaitForChild("Bar")

	if script.Parent.Parent.Enabled == true then
		bar.LocalScript.Disabled = true
		bar.Visible = false
		script.Parent.StartupSound.Volume = 1
		logo.ShiftButton.ShiftLayer1.Transparency = 1
		logo.ShiftButton.ShiftLayer2.Transparency = 1
		logo.ShiftButton.ShiftLayer1.UIStroke.Transparency = 1
		logo.ShiftButton.ShiftLayer2.UIStroke.Transparency = 1
		logo.TextLabel.TextTransparency = 1
		for i = 1, 10 do
			logo.ShiftButton.ShiftLayer1.Transparency -= 0.1
			logo.ShiftButton.ShiftLayer2.Transparency -= 0.1
			logo.ShiftButton.ShiftLayer1.UIStroke.Transparency -= 0.1
			logo.ShiftButton.ShiftLayer2.UIStroke.Transparency -= 0.1
			logo.TextLabel.TextTransparency -= 0.1
		script.Parent.LoadingText.Visible = true
		script.Parent.LoadingText.LocalScript.Disabled = false
		bar.Visible = true
		bar.LocalScript.Disabled = false
		game:GetService("TweenService"):Create(script.Parent.StartupSound,TweenInfo.new(5,Enum.EasingStyle.Linear),{Volume = 0}):Play()
		script.Parent.Visible = false
		script.Parent.Parent.Main.Visible = true
		script.Parent.LoadingText.Visible = false
		script.Parent.LoadingText.LocalScript.Disabled = true
		bar.Visible = false
		bar.LocalScript.Disabled = true
		script.Parent.Visible = false

Here’s some footage.

If thats not enough, here’s the explorer:


Any help would be appriciated!

(Edit: Also, it doesnt made Main visible, it gets stuck.)

It may be that main is hidden behind another gui. In the properties, is it visible?

It isnt visible, and when i playtested, it didnt turn visible.

If you put a print before and after the part changing the visibility, do they both print?

Sorry for the delay, but it did print after it tried to make itself invisible.

Could you send an image of the properties of main after it tries to make itself visible?

Here is the Main:

Here is the Startup:

I found out that it was because the shutdown was visible, but it wasnt able to make the main visible though.

Nevermind, I was using starterGui, not playergui.

Thanks for trying to help though!