Hi everyone,
I am encountering an issue with my script from a text button and would appreciate any help or guidance you can provide.
I am working on a shop for my game. When a desired in game part is touched, the Shop Ui pops right after (that mechanism works), but the shop has 3 other frames associated with 3 side buttons that should open each of the frame (as shown below).
Example: when button 1 is clicked, it should reveal a frame positioned in the middle of the screen (here is the Gamepass Shop Frame) and this should happen for button 2 and button 3 as well, but with a designated frame for each button. The main problem is that the buttons (1, 2 and 3) cannot be clicked and the frames cannot be revealed. I have tried different methods but none seem to work.
Here is one script I’ve tried before:
local textButton = script.Parent
local gamepassesFrame = textButton.Parent:FindFirstChild(“GamepassesFrame”) – this is how the main frame is named, the one that should appear when button is clicked
local function toggleGamepassesFrameVisibility()
if gamepassesFrame then
gamepassesFrame.Visible = not gamepassesFrame.Visible
else
warn(“GamepassesFrame not found”)
end
end
textButton.MouseButton1Click:Connect(toggleGamepassesFrameVisibility
Thank you in advance for your help. Any insights or suggestions will be greatly appreciated as I’m trying to solve this problem as soon as possible!