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

How to check if multiple parts exist in workspace?

I'm trying to check if bread_part, ingredient1, ingredient2 are existing in workspace (at the same time)

while true do
	wait(3)
	if game.Workspace:FindFirstChild("bread_part") and game.Workspace.FindFirstChild("ingredient1") and game.Workspace:FindFirstChild("ingredient2") then
		print("condition met")
	end
end

The script works when I'm only looking for one object

while true do
	wait(3)
	if game.Workspace:FindFirstChild("bread_part") then
		print("win condition met")
	end
end

But it doesn't work when I'm checking for 3 objects at once

1 answer

*edit

Turns out the script was working after all. Sorry for posting :P

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