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

How can I detect if a string is in a table?

Hi, I want to find my string in my table. I want to see if the string is in the table, FindFirstChild is not working.

RemoteEvent.OnServerEvent:Connect(function(Player, Robbery)
	
	local AvailableRobberies = {"ImpossibleJewelry"}
	
	if AvailableRobberies:FindFirstChild(Robbery) then
		
		print("Result")
	end
end)

1 answer

✓ Accepted answer
if table.find(AvailableRobberies,Robbery) then

1 comment

0

I should have known this, thanks lol

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