Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make a repeat until loop if children are not named something specific?

As per the usual, I'm stumped. I've finished making a Gui, where the game gives you 4 choices & you have to pick one. Now, I've done all the tweening and such, but I'm confused about how to fade all of the other choices that are not equal to the PickedString.Value.

So, my question is; How do you perform a repeat until the only remaining child is one with a specific name? I've tried using for loops, to no avail. Any freshies out there with a clue as how to do this?

1 answer

✓ Accepted answer
for i,choice in pairs([Where All The Choice Gui's Are Stored In]:GetChildren()) do--Makes a table of all the choice gui's and loops through them
	if choice.Text ~= PickedString.Value then--Makes sure that it isn't the PickedString value
		--Do fade stuff here
	end
end

This discussion is preserved as it was. New answers, comments, and votes are closed.