How to add plugins to mupen 64

i was playing paper mario, and every time objects move or when it transitions into battle, it starts to lag very slowly until the battle starts or until the moving ends (like during the choosing of the save files), i tried playing it on glide64 on mupen64 itself and it worked perfectly. yet every time i try to put the plug-in into the core on retroarch, it crashes and sends me to the main menu, am i missing something, and if so can someone help me