Filament change script

I am using Creality slicer 4.8. I have been attempting to use the Filament change script. Sometimes it works, sometimes I get an error “Extrude only move too long. See the 'max_extrude_only_distance” config option for details". I only set the layer height, the other settings I leave at default. Like I said, sometimes it works, sometimes not. Any ideas?