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

Is there a function that acts as an opposite to :IsA()?

I've been trying to find this for quite a bit of time.

Is there any sort of function that acts as the opposite of :IsA()? I've been trying to figure out or make one but I haven't been successful.

1 comment

0

Off topic, but the fact that you have a space in your name means you're from ~'06. Hats off to you.

1 answer

✓ Accepted answer

The method of Instance returns a Boolean, you can simply pair it with 'not' to flip the evaluation:

if (not workspace.Part:IsA("Player")) then
	print("Is a " .. workspace.Part.ClassName .. "!")
end

That or use a debounce.

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