Hello. I have made a script which is meant to remove a house when a player leaves or types a command. I made this a function. This seems to work fine but whenever around 8 people start playing I get this error saying "Infinate yield possible on". This is really annoying because I know for a fact it's there and I keep getting these errors... Heres my script
function remove(booth)
for i, child in ipairs(game.ReplicatedStorage.Information:GetChildren()) do
if child:WaitForChild("Plot") then
if child.Plot.Value == booth.Floor.Floor then
child:Destroy()
end
end
end
end
This works sometimes????

5 comments
Try using "FindFirstChild" instead
I also attempted that but had the same issue
Can you use a "print(i, v)" on the table to see if anything is nil? ipairs will stop the function if it returns nil
It isn't nil though I manually put it there that's what is confusing me?
Plus it works sometimes, so it must be there