I have to keep the tweeters in my cabs in the off position and the treble not too high because I can hear the string hitting the fret when I press down on it. It causes a clacking or pinging sound when the string touches the fret. Depending on what I'm playing, sometimes I hit the string harder sometimes not. It doesn't seem to make a difference.
Too low action, pickup height, technique, new bright strings, too much treble, fret size and material, string tension, poor setup on bass...all these things contribute to 'clacking'. Just take some time and troubleshoot.