How do I pick a random child?
Like I want this NPC to go to a random tree located in Workspace but how do I do this?
How do I pick a random child?
Like I want this NPC to go to a random tree located in Workspace but how do I do this?
math.random!
while wait(1) do
local object = workspace:GetChildren()[math.random(1,#workspace:GetChildren())]
end
I don't think I have to explain, if you have any questions though, please ask
This discussion is preserved as it was. New answers, comments, and votes are closed.
5 comments
omg I forgot about it! thank you!!!
np
Can you set this as best answer? :P
Thanks, I was looking for the same thing.
np