Here's a screenshot to understand my problem: http://cobra-rblx.deviantart.com/art/Roblox-Scripting-Help-Lua-519721072
You will not understand what I'm trying to say without taking a look at the screenshot.
Well I'm not very experienced with Lua, but I want that script to refer all the "PACK" labeled item's properties. For example:
script.Parent.Parent
^^That is the type of code I want^^
I just need a simple 1 line of code that can help me refer to all those "PACK" items. It's really simple so please help!
The answer to your question is quite complex and I doubt you'll be able to understand it. I suggest you just study a bit more about scripting, especially loops. Here's the script anyway:
local packs = script.Parent.Parent.Parent:GetChildren() for a, pack in ipairs(packs) do if pack.Name == "PACK" then -- Do what you want to every PACK here end end
local gui = game.StarterGui.Terms script.Parent.MouseButton1Click:connect(function() for i, v in pairs (gui:GetChildren()) do if v.Name == "PACK" then v.Visible = true end end
Try that. Read the output if there's any errors.
Hope this helped!