thanks i did end up changing that part and i added it differently this is what the code ended up being to work in the end.
but another problem i came across was the sprinting not working for multiplayer after i added multiplayer like every frame it gets pushed back to walking speed after setting the sprint so it jerks forward and back setting the speeds over and over