GUI Resets on respawn, even after ResetOnSpawn is Disabled

Hi, ill keep my post short. I’m making a desktop simulator based almost entirely on UI elements and part of this game features a boot sequence created with fading Frames and image labels inside a screen gui. After all of the sequences are done running I have this simple code to get it out of the way of the user.

wait(11)

game:GetService(‘Players’).LocalPlayer:WaitForChild(‘PlayerGui’).WinLogon.MSstart.ResetOnSpawn = false

game:GetService(‘Players’).LocalPlayer:WaitForChild(‘PlayerGui’).WinLogon.MSstart.Enabled = false

print(“done”)

It simply waits for the sequence to finish and then it Disables the Screen GUI, however upon reseting the gui is covering the entire screen and all properties are reset to their initial values despite the above methods. Can anyone offer me any insight? Thank you.

1 Like

Is it in StarterGui? If so clone it from another service, GUIs in StarterGui can’t change

sorry to bother but do you know how I would go about doing this?

Something like this, in this case, the GUI is in ReplicatedStorage, and named GUI, you will probably have to adapt this script to yours

local RS = game:GetService("ReplicatedStorage")
local GUI = RS.GUI
local GUIClone = GUI:Clone()
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local PlayerGui = Player.PlayerGui

GUIClone.Parent = PlayerGui
--your other code--

And by the way, your script is unreadable, if you want it like this

This is a script

you have to add 3 at the start of the script and 3 at the end of the script, like this:

Ah I see, thank you ill try this out when i get the chance. Would replicating the screen gui replicate all of its children as well? and would i specify their attributes to predict them being moved there or are cloned components automatically updated with their counterparts.

What do you mean by

? But yes, when cloning you will clone every children of the GUI and every properties they have, and if you will have to destroy it then simply put this at the end of the script/at the point you need

GUIClone:Destroy()

which will destroy every children of the GUI

alright i don’t plan to destroy it since i may want to reuse it while the player is still in the game so i’ll try to disable it again and let you know thank you this has been a huge help.

You’re welcome, there’s no problem, if you ever need me just ask :smiley: