So basically, all the GUIs in my game work except for the Rules GUI This is what i put in the local script
local Frame = script.Parent.Parent.Parent.Parent.Rules.Frame
script.Parent.MouseButton1Click:connect(function()
if Frame.Visible == false then
Frame.Visible = true
elseif
Frame.Visible == true then
Frame.Visible = false
end
end)
Here's a photo of the GUIs itself: https://prnt.sc/jxwa3u
I'm not sure what it is im doing wrong. What should i change to fix this?

3 comments
Oh my you have a ton of Parents, but try using just MouseClick instead of MouseButton1Click
Why not put the LocalScript under the frame Rules itself?
I separated all the GUIs which is why there's a lot of parents in the script. https://prnt.sc/jxwkgd