I am trying to change a Gui in a certain part of a main game script and I was trying to use PlayerGUI with the variable game.Players.LocalPlayer.PlayerGUI but I am getting an error saying LocalPlayer is a nil value. How should I access this?
PlayerGui isn't accessible from a server script if FilteringEnabled is on. You could use a remote event to communicate with a local script, which can then access the Player Gui. Wiki article on remote events here.
Hope that helped
Im guessing that you have Filtering Enabled. With Filtering Enabled the GUI must be 100% Client Sided or it will not function properly. Server Script cannot access the player GUI unless you use Remote Events/Remote Function/Other tricks that I dont know about. Other than that there is almost no way to communicate with the GUI from the Server.