So when a player clicks the button it disables the gui property resetonspawn, correct? By the way which kinda script is this or where did you put it I just want all the details.
Not exactly sure what you are trying to accomplish or I don’t understand that much about what you are trying to do must this should help you: LayerCollector.ResetOnSpawn
So, analyzing in ROBLOX Studio, the script did not work because it could not find the Parent of the GUI as only putting script.Parent.Parent.Parent.ResetOnSpawn = false … Not to mention that you forgot to create a variable that prints a parent value for the ClickDetector that will make the part (aka button) work.
I would recommend you creating like this sample:
local clickDetector = script.Parent -- Making a value for ClickDetector informing that he is the parent for the script
local button = game.Workspace.TestingButton -- Making a value to inform what/where the part is located at the Workspace
local TestingScreenGUI = game.StarterGui.ScreenGui -- Making a value to inform the location of the GUI, so we can change its properties of it.
clickDetector.MouseClick:Connect(function()
TestingScreenGUI.ResetOnSpawn = false -- Informing that once clicking the button, it should disable the option ResetOnSpawn by giving an opposite answer, "false".
if TestingScreenGUI.ResetOnSpawn == false then
print("ResetOnSpawn has been disabled") -- Prints a message to verify if the ResetOnSpawn truly was disabled.
else
print("Something is not correct!") -- In case the script is printing something wrong, we make a conditional statement stating about it, "else".
end
end)