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)
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)