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")
script.Parent.Parent.Changed:Connect(function()
if script.Parent.Parent.Enabled == true then
bar.LocalScript.Disabled = true
bar.Visible = false
script.Parent.StartupSound.Volume = 1
script.Parent.StartupSound:Play()
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
wait(0.2)
end
wait(2)
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()
wait(8)
script.Parent.Visible = false
script.Parent.Parent.Main.Visible = true
else
script.Parent.LoadingText.Visible = false
script.Parent.LoadingText.LocalScript.Disabled = true
bar.Visible = false
bar.LocalScript.Disabled = true
script.Parent.Visible = false
script.Parent.StartupSound:Stop()
end
end)
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.)