I was trying to remove background from this gif in photoshop.
When I was done I saved it for web but my problem is that when playing the gif after saving, loads of white dots appear out of nowhere. Can I do something about that?
The culprit is what I suspected in the comments. There are translucent pixels all around in various frames. Gif file format doesn't support that. Pixels are either fully opaque or fully transparent, so when you export that, it makes all of those seemingly nonexistent translucent pixels visible.
I checked this before the export by: giving the document a background, adding a Levels adjustment layer with blend mode
difference to bring out any translucent pixel:
Luckily in this situation, you can get rid of the dots by adjusting
Transparency Dithering when exporting.
In the "Safe for web" window, you need the following:
Diffusion transparency(probably any of the three would work in this case)
Another major thing I noticed about in the psd file. Make sure to select all frames in the
Timeline panel and right click the little bouncy ball icon on the bottom left of one of the frames and set frame disposal method as
dispose. This will prevent frame overlapping.
With those changes the exported gif will be more like this one... Without the black background of course...
In your quest to remove the background, I guess, you left a bunch of white pixels surrounding the dark grey edge. You could try to get rid of it with
Layer > Matting > Defringe..., but I'm not sure if it's worth it, because you'd have to do it to every layer and the end result might not be that much better.