So this script is part of a Crafting GUI and recently (probably after an update) I noticed the script stopped working while in play mode. The script is in a button and makes another GUI object appear when the button is clicked but for some reason nothing happens when its clicked in play mode. It works perfectly fine in edit test mode, and IS in a local script. Anyone have any idea of what happened?
Sidenote: Also, I had a similar script to open a different GUI and it wasn't working either, so I removed the for ..... do function part and it started working so I'm pretty sure it has to do with that part of the script. Thanks for any help!
local player = game.Players.LocalPlayer
local BUTTON = script.Parent
local FRAME = BUTTON.Parent.Parent.ScrollingFrame1
FRAME.Visible = false
--------------------------------------------------
function onMouseButton1Down(mouse)
local SBUTTONS = BUTTON.Parent.Parent:GetChildren()
local NAME = BUTTON.Name
FRAME.Visible = true
for index, child in pairs(SBUTTONS) do
if child.Name ~= NAME and child.Name ~= "SelectBar"
then child.Visible = false
end
end
end
BUTTON.MouseButton1Down:connect(onMouseButton1Down)

4 comments
Are you using a Local Script, and if so where is it located?
Yes its a local script within a button within a frame within another frame within a main GUI within StarterGUI
is FE on?
No it wasn't, could that be the problem?