you can’t use game.StarterGui when trying to change GUIs on the screen. Basically, the “StarterGui” is where GUIs are stored before a player enters the game. Once the player enters the game, the GUIs that they see on the screen are duplicated from StarterGui and put into “PlayerGui” (located inside of the player). Everything that the player sees is going to be in the PlayerGui, therefore all changes to Guis must be made there. The easiest way to do this is to just insert local scripts into the GUI itself so that you can locate it with script.Parent (or stuff like that).
That will not do what you want it to do: the script isn’t going to wait for the tween to finish-- it just keeps running. To add a function at the end of the tween, make the final argument of :TweenSize a “callback” function which will automatically run when the tween stops.
Thanks so much! So, this is a ServerScript. So I can’t do Script.Parent functions with it. Should I put the Gui inside of the ServerScript and do game.ServerScriptService.FinishApplication.(Gui name).Visible = true?
Sounds to me like there are a whole bunch of problems with your script now–
You said it’s a server script, but there’s hardly ever a reason for there to be a GUI being handled with a server script. Also, you said “FireServer” in that script-- you can’t do that with a server script. Start the script over. You should make it a LocalScript inside of the Gui (even though you CAN do it with a server script nonetheless) and then :TweenSize() on the GUI that the player sees-- not something in the StarterGui.
But I want the tween to happen after completing the quiz. Should I do the FireClient when the quiz is over and then fire the localscript? (This will probably not work)
That is a very vague question which I, of course, cannot answer since I have no idea what your script is for, nor did you even send the full script. The only 2 things that I am here to point out to you are that:
You cannot make changes to a player’s GUIs through game.StarterGui
Tweens do not make the script wait for the tween to finish before continuing.