So im trying to make a stand system where you picks a random stand but I dont want it to pick a stand with a value named "Private" in it. I just dont know a efficant way to keep picking a random one untill it finds one without the tag. This is the script that picks it:
local Stand = game:GetService("ServerStorage").Stands
local items = Stand:GetChildren()
local randomStand = items[math.random(1, #items)]
if randomStand:FindFirstChild("Private") == nil then
return
else
local randomStand = items[math.random(1, #items)]
end
Thanks in advanced

2 comments
What is the varible for the awser of the FindStand() (The selected stand)
In the FindStand function on line 9 you can replace print('Found') with return randomStand, that will return the stand that has been randomly picked. Or this is not what you mean?