the thing is, I write code, how I write it...I've received this error: Frame is not a valid member of Frame. What am I to do? I'm still new to coding, and I'm not sure what the mistake is.here is the script:
local frame = script.Parent.Parent.Frame
local open = script.Parent.Parent.Open
local blur = Instance.new("BlurEffect",game.Workspace.CurrentCamera)
blur.Size = 0
script.Parent.MouseButton1Click:connect(function()
if open.Value == false then
frame:TweenPosition(UDim2.new(0.5,-250,0.5,-175),"Out","Quint",1,true)
for i = 0,10,1 do
wait()
blur.Size = i
end
open.Value = true
elseif open.Value == true then
frame:TweenPosition(UDim2.new(0.5,-250,-0.5,-175),"Out","Quint",1,true)
for i = 10,0,-1 do
wait()
blur.Size = i
end
open.Value = false
end
end)
I need the button to close the store menu, but that doesn't happen. but when I press the "open shop" button, then everything perfectly opens and closes, and there is the same script, and everything is normal, what is wrong here?I wrote that the error in 1 line, but no matter what I tried, nothing worked

4 comments
Is the script inside the frame? What's the exact heirarchy of the script and guis?
there is no other script inside the frame, there are only other buttons. What's the exact heirarchy of the script and guis? - what do you mean?
He means what does it look like in the explorer, like, the tree, so what is parented to what, etc.
use WaitForChild / FindFirstChild.