Instead of a water gun, try a spray bottle, such as are used for plants. They can be adjusted from a fine spray (which is great for plants, but no use on cats) to a nice long shot that goes quite a distance. Usually I only have to show it to my cats and they stop what they were doing.
water guns for your cats
I have Dulsey's grandmother.