The script is making the ui found in StarterGui visible.
All of the uis in startergui are given to the players when they join, but making changes to those uis after they have been given to the players will not effect the player’s uis.
To make changes to the player’s ui in a local script, use game.Players.LocalPlayer.PlayerGui instead of game.StarterGui.