local LoadingFrame = MenuGui.LoadingScreenFrame:GetChildren()
Your code will error because LoadingFrame is a table, since GetChildren returns a table of the children.
You can loop through the children of an object as such:
for i, v in pairs(object:GetChildren()) do
print(v.Name)
end
So to implement this into your script, you have to loop through MenuGui.LoadingScreenFrame:GetChildren(), the children of MenuGui.LoadingScreenFrame as such:
for i, v in pairs(MenuGui.LoadingScreenFrame:GetChildren()) do
v.Visible = true
wait(1)
end
We can rename the i and v variable to a more fitting name:
for _, frame in pairs(MenuGui.LoadingScreenFrame:GetChildren()) do
frame.Visible = true
wait(1)
end
i has been renamed to _ because variables named _ usually means they are not used.
v has been renamed to frame because the children of Menu.LoadingScreenFrame are frames.
local LoadingFrame = MenuGui.LoadingScreenFrame:GetChildren()
In your script, you define LoadingFrame as the children of Menu.LoadingScreenFrame, but you attempt to edit the Visible property of Menu.LoadingScreenFrame incorrectly:
LoadingFrame.Visible = true
What you should do instead is define LoadingFrame as MenuGui.LoadingScreenFrame, not its children:
local LoadingFrame = MenuGui.LoadingScreenFrame
So now you're actually editing MenuGui.LoadingScreenFrame.Visible when you do LoadingFrame.Visible = true.
Your code should now look like this:
local Player = game.Players.LocalPlayer
local MenuGui = Player.PlayerGui.MenuGui
local LoadingFrame = MenuGui.LoadingScreenFrame
local MenuFrame = MenuGui.MenuFrame
local TeamsFrame = MenuGui.ChangeTeamFrame
MenuGui.Enabled = true
LoadingFrame.Visible = true
for i, v in pairs(LoadingFrame:GetChildren()) do
v.Visible = true
wait(1)
end