Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Despite everything being set up right and no errors and output, GUI isnt changing?

This is a script inside of a textbox inside of a GUI inside of a Folder inside StarterGUI. The GUI that the script is trying to change is in the same folder as the GUI the textbox is in. any help?

local mask = script.Parent.Parent.Parent.CameraCore

function MouseOver()
    if mask.Enabled == false then
        mask.Enabled = true
	elseif mask.Enabled == true then
        mask.Enabled = false
    end

end


script.Parent.MouseEnter:connect(MouseOver)

1 answer

✓ Accepted answer

Try this:

local mask = script.Parent.Parent.Parent:WaitForChild("CameraCore")--Edited this so that it waits for the object to load

function MouseOver()
    mask.Enabled = not mask.Enabled--Simpler solution, not basically returns the opposite of it so if you had print(not false) it would print true
end


script.Parent.MouseEnter:connect(MouseOver)

This discussion is preserved as it was. New answers, comments, and votes are closed.