The reason it might not work properly has something to do with this website/forum.
If it doesn’t work, head to the reddit page and copy it from there(first comment below the OP): https://www.reddit.com/r/classicwow/comments/1dyrmdc/pet_action_bar_bugged_any_fix/
Note: In case you’re not happy with the positioning of the pet action bar, set by this script. You can easily adjust where it’s placed by changing the XY values at the end. Where it says ‘400,100’ in the script.
I set mine to ‘620,100’ which, for me, places the pet action bar in the center, just above my other action bars.