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

My match bool isn't working, and letting viruses bypass it?

I'm making an anti-virus and it uses string:match() to see if it's a virus or not. However, when it scans, it says it's not although it is a virus. Here is the line:

if a.Source:match(codes[i]) then

a is the object being scanned.
i is the argument in a for loop.
codes is the virus definition.
Can anyone help? Thanks in advance!

1 answer

Try using this:

if a.Source.Name == codes[i] then
	--do something
end

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