Edit 2: Now it works. game.StarterGUI doesn't work. I now use Parent.
Hey, I don't know why, but this script doesn't work for me:
script.Parent.MouseButton1Click:connect(function()
game.StarterGui.ScreenGui.Login.Visible = false
game.StarterGui.ScreenGui.LoggingIn.Visible = true
wait(5)
game.StarterGui.ScreenGui.LoggingIn.Visible = false
game.StarterGui.ScreenGui.Loading.Visible = true
end)
There's no message in the Output
I tried this too:
script.Parent.MouseButton1Click:connect(function()
print(1)
game.StarterGui.ScreenGui.Login.Visible = false
game.StarterGui.ScreenGui.LoggingIn.Visible = true
print(2)
wait(5)
print(3)
game.StarterGui.ScreenGui.LoggingIn.Visible = false
game.StarterGui.ScreenGui.Loading.Visible = true
print(4)
end)
But there's no Number in the Output again. The numbers aren't there too.
Edit: Now it prints the numbers. But the rest doesn't work.

2 comments
You are using the starter gui not the player gui which is why this will never work.
Im really new to Coding. I got it to working with StarterGUI. Does StarterGUI mean, everyone see's it? If yes, could you tell me how PlayerGUI works.