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

Exception tables

Hello, would i make a exception table, it would be for a Touched event because it spawns parts on my that have the touched in them? I need the table to keep them from harming me.

1 comment

0

ClassNames or Names?

1 answer

local whitelist = 
{
	Part = true;
	Brick01 = true;
	Handle = true;
}

script.Parent.Touched:connect(function(hit)
	if not whitelist[hit.Name] and not whitelist[hit.ClassName] then
		print("ok")
	else
		print("no")
	end
end)

Dictionaries

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