[UNET] Having problems with clients not being able to shoot after they reload
So I have a GunScript script that handles the reloading, zooming, and firing of guns in my game. Reloading works completely fine on the server side; allowing the server to fire, reload, and fire again. However, on clients they're unable to fire after reloading, and I'm not sure why.
I'll walk you through how the script works. An external script tells the gun to fire by sending a "FirePrimary" or "FireSecondary" message using SendMessage. This is also the case for reloading. When the reload function is called, it plays the reload animation. This works perfectly for both server and client. I should point out that up until this reload, the client has been able to fire just fine when they have authority over the gun (the authority should always be on whoever picked up/is using the gun, and this is handled by another external script). Now, once the reload animation completes and calls the "RealReload()" function, the client can no longer fire despite there being greater than 0 loadedAmmo. I'm not sure what's causing this, but it's tough to have a game when clients can't play correctly! Any help is appreciated.