Alright, so I've got an interesting issue. The script and animations actually work just fine, and everything does what it's supposed to. However, every time I fire the gun this is for, this error pops up despite everything working fine. 18:14:32.032 - LoadAnimation requires an Animation object
Here's the script:
game.ReplicatedStorage.Equipped.OnServerEvent:Connect(function(player, animation) local newAnim = game.Workspace[player.Name].Humanoid:LoadAnimation(animation) newAnim:Play() game.ReplicatedStorage.Unequipped.OnServerEvent:Connect(function() newAnim:Stop() end) end) game.ReplicatedStorage.Fire.OnServerEvent:Connect(function(player, animation) local fireAnim = game.Workspace[player.Name].Humanoid:LoadAnimation(animation) script.Parent.Handle.FireSound:Play() fireAnim:Play() end) game.ReplicatedStorage.Reload.OnServerEvent:Connect(function(player, animation) local reloadAnim = game.Workspace[player.Name].Humanoid:LoadAnimation(animation) script.Parent.Handle.ReloadSound:Play() reloadAnim:Play() end)
This error is incredibly annoying to deal with, and just generally makes the gun feel like it's broken somehow. Thanks!