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

How can I make it so that a different child is found every time in :FindFirstChild()?

As far as I know, it will keep choosing the same child if repeated on a parent.

2 comments

0

i dont think there is a "simple" way

0

Well, yea, because it's FindFirstChild, not FindRandomChild. Most you can do is store all children with the same name in a table and then select a random item from the table.

1 answer

Use this script:

local FindChild = game.TYPE HERE WHERE YOU WANT IT TO SELECT A CHILD 
local SelectedChild = FindChild[math.random(1, #FindChild)]

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