Does anyone know how to make a script that makes like 7 Text Labels visible without doing
TextLabel1.Visible = true TextLabel2.Visible = true TextLabel3.Visible = true TextLabel4.Visible = true TextLabel5.Visible = true TextLabel6.Visible = true TextLabel7.Visible = true
You can use a for loop along with string concatenation to get the names.
for i = 1, 7 do if script.Parent:FindFirstChild("TextLabel"..i) then script.Parent["TextLabel"..i].Visible = true; end end
Otherwise, you can just loop through everything in 'script.Parent' if they do not have the names 'TextLabel'
for i,v in pairs(script.Parent:GetChildren()) do if v:IsA("TextLabel") then v.Visible = true; end end
Loops: http://wiki.roblox.com/index.php?title=Loops
Concatenation: http://wiki.roblox.com/index.php?title=Concatenation