I have a local script that allows the player to sprint, and I also have a tool that uses viewmodel in a local script. How could i communicate between the two to fire a sprinting animation for the viewmodel efficiently?
Why don’t you just use a module script? This would allow for the 1st script to communicate with the module, that could act as your second script or just a module and a second script that’s separate that also communicates with the module.
You’re probably looking for a BindableEvent in this situation
modules arent a bad idea but i might look into the bindable events just in case that would work any better.
That depends entirely on if your scripts are localscripts or serverscripts, as BindableEvents and BindableFunctions only work with server - server communication. As you have a sprinting system, I personally believe that it wouldn’t require that since making a sprinting system server-sided would result in your sprinting-system being more clanky than it would being made client-sided.