when i click the shop button it should make ButtonFrame visable = true and the Shop visable = true this is the code inside the button
local shopButton = script.Parent -- The 'ShopButton' frame
local mainGui = shopButton.Parent.Parent.Parent.Parent -- The 'Main' ScreenGui
-- Locating the target frames using your exact names
local mainFrame = mainGui:WaitForChild("MainFrame")
local buttonFrame = mainFrame:WaitForChild("ButtonFrame") -- No 's' at the end
local shopPage = buttonFrame:WaitForChild("Shop") -- Shop is directly in ButtonFrame
shopButton.InputBegan:Connect(function(input)
-- Detects mouse click or mobile touch
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
-- 1. Make the container and shop visible
buttonFrame.Visible = true
shopPage.Visible = true
-- 2. Hide the 4-button selection grid so it doesn't overlap
shopButton.Parent.Parent.Visible = false
print("Shop is now visible!")
end
end)
** You are now Level 4! **
