Issue with my additional attack script

I have an issue with my script for my dodowyvern that allows it to use the x button to use an attack index it cant normally use. Here is the script i am using, this script works fine in the devkit and in single player, but on my server it does not work at all or locks the creatures movement up completely.