So Im trying to make a gun that can erase models, and my code for checking if its a model looks like this:
if parent:IsA("Model") or parent:IsA("Folder") and not parent:IsA("Workspace") and parent.Name ~= character.Name then
however, im not trying to be able to shoot anything thats not in a model and watching all the parts in the game dissapear. So i added a and not parent:IsA("Workspace") in the if to try and fix this issue. However, this doesn't work, and I've had issues with this sorta thing before, where i cant use "not" because its not working. Any help?

1 comment
What happens when you run this code?