Im making a shop, but I can't fix this error. Can someone help me?
Here is the code: ~~~~~~~~~~~~~~~~~local Frame = script.Parent.Parent.Frame
script.Parent.MouseButton1Click:Connect(function() Frame.Visible = true end)
~~~~~~~~~~~~~~~~~
Thank you for taking your time to help me
Frame is not a valid member of ScreenGui "Players.LSGar2011.PlayerGui.Shop"
this means that Frame is not a child of the "Shop" Screen gui. meaning the script is saying frame doesn't exist.
if you are 100% sure it is where you specified it is at, try using WaitForChild.
local Frame = script.Parent.Parent:WaitForChild("Frame",1) -- 1 is called the timeOut parameter. script.Parent.MouseButton1Click:Connect(function() Frame.Visible = true end)
Try typing that instead:
local Frame = script.Parent.Parent.Frame function frameVisible() --you can change the "frameVisible" to whatever you want! Frame.Visible = true end script.Parent.MouseButton1Click:Connect(frameVisible) --or you can use MouseClick instead of MouseButton1Click
If your problem still exists, tell me what error you got in the output. I hope I helped!