Enabled/disabled GUI screen not working

so this is my first time trying to script GUI’s and i’m facing some issues right now
image

as you can see, here’s a GUI i made, and what i want to achieve is, when the SaveButton is clicked, it will open a new ScreenGUI with 3 buttons parented for 3 save files slots

and this is what i’ve tried so far

ive been reading RobloxDocs but i don’t know exactly what the issue here is, how can i make that SaveButton (“text button”) Enabled property switch between true/false with only one click?

This should work.

local SaveButton = script.Parent
local SaveMenu = SaveButton:FindFirstChild("SaveMenu")

SaveButton.MouseButton1Click:Connect(function()
	if SaveMenu.Enabled then
		SaveMenu.Enabled = false
	else
		SaveMenu.Enabled = true
	end
end)
1 Like

it worked well, thank you for the help!

1 Like

So I guess his script was not working because when the function executes it sets the GUI screen to enabled and then the if statement gets overwritten?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.