Try searching for “mouse” in the search in Lua Learning, it should give you some tutorials!
It almost worked. When I click the button not the image label. the error showed up. I guess that’s the reason why these error didn’t even show up.
Error: NEWscripts is not a valid member of Frame “Players.censoredname.PlayerGui.playbloxtopia.MainUI.ScrollingFrame.NEWscripts”
Perfect. Now to fix the error, use this.
local ClickButton = script.Parent;
local NewScripts = ClickButton.Parent.Parent.Parent;
ClickButton.MouseButton1Click:Connect(function()
NewScripts.Visible = not NewScripts.Visible; --// reverse visibility
end)
One problem is. All Script Buttons Like NEW, MISC, MAPS, LEGACY, CHARACTERS, HOLIDAY, diappeared.
also dude. Its starting to work. lets keep going!
It means the frame you’re trying to change visiblity for is not this one.
Try this instead.
local ClickButton = script.Parent;
local NewScripts = ClickButton.Parent.Parent.Parent.Parent.NEWscripts;
ClickButton.MouseButton1Click:Connect(function()
NewScripts.Visible = not NewScripts.Visible; --// reverse visibility
end)
It said this error, NEWscripts is not a valid member of ImageLabel “Players.censoredname.PlayerGui.playbloxtopia.MainUI” - Client - LocalScript:2
Show me the explorer, with all these frames.
Just noticed you changed LocalScript parent? That will break it.
And oh. lemme see.
Did you change the frame names? It’s different than this one you showed above
Can I see where you parented the LocalScript now?
Okay.
btw same error keeps showing up, plus I dont think I have changed local script parent. I dont remember either.
the code is
local ClickButton = script.Parent;
local NewScripts = ClickButton.Parent.Parent.Parent.Parent.NEWscripts;
ClickButton.MouseButton1Click:Connect(function()
NewScripts.Visible = not NewScripts.Visible; --// reverse visibility
end)
and the local script is inside the text button. showed the parent. in the screenshot.
Can you send an image where the LocalScript is parented at?
I can’t see the LocalScript anywhere there.
ah okay. Im sorry i couldnt help.
I figured out what’s going on. You need to hide all the buttons but that trigger button, unfortunately, you put it in the same Frame that you want to hide/show, so basically you’re hiding the button too.
Try this one, should hide all buttons but the trigger one.
local ClickButton = script.Parent;
local NewScripts = ClickButton.Parent.Parent;
ClickButton.MouseButton1Click:Connect(function()
for _, Button in next, NewScripts:GetChildren() do
if Button:IsA'ImageButton' then --// only image buttons
Button.Visible = not Button.Visible --// reverse visibility
end;
end;
end);
Fixed the image label placeholder showing up. We need to hide that green blank frame thing now.
Looking at the children of that Frame, it looks like it has a UICorner so I’m assuming that green frame is the NEWscripts Frame itself.
Can you provide the UI File, I’ll fix it for you. Unfortunately, it looks like you’ll have to make the buttons in a different frame. It’s okay if you don’t want it on public, we can go to PMs.
Edited: Fixed it for OP.
He had the buttons made already, but they had a problem. They were only setting NEWscripts Frame Visible to false and not vice versa. Fixed it by simply using “not Frame.Visible” in each LocalScript from those buttons.