My friend has uploaded the animation to roblox, due to it being his game, follow various tutorials and none of them work. I’m not very sure what the problem is but I mainly suspect the issue lying within the meshes in the model.
Check if the line where it checks if the setting is enabled even runs. If it does then you might want to look into either loading animations through the Animator Instance, under the Humanoid, rather than loading to the Humanoid directly. The most likely issue is to do with the way how playing animations works. Seems like either line 13 or line 16 would be the most likely issue. Try and load the animation directly first, instead of checking for a class of type Animation. I’m saying it might be due to the way how roblox sets up animations for people who don’t own them (Team Create and Shared Group Assets). Maybe it doesn’t want to load in roblox studio as you’re technically hosting the server. Try and place this in roblox and see if the animation loads.