#can someone make me a script atp

1 messages · Page 1 of 1 (latest)

honest prism
#

ive been trying to get a simple script to open close the childs of guiobjects but it js wont work

#

shit wont work

hard vale
#

do u use screengui or playergui in the script to reference the ui elemenrs?

small remnant
#

did you do this?
local Menus = script.Parent.Meuns

hardy gate
hardy gate
# honest prism shit wont work
  1. begin with a variable to track visibility
  2. make a function that whenever you press the open shop button it makes all children visible/invisible
  3. make a for loop inside the function that loops through all children to switch the visible value on/off

local visible = false

local function openShop()
if visible then visible = false end
if not visible then visible = true end

 for _, v in ipairs(Menus:GetChildren) do
      if v:IsA("TextButton") or v:IsA("Frame") or v:IsA("ScrollingFrame") then
           v.Visible = visible
      end
 end

end

openShopButton.MouseButton1Click:Connect(openShop)

#

something like that

honest prism
#

Thx i will try that later