Can Sprint Check not working

So I’m trying to implement a check that only lets a player sprint if they are not crouched and are moving forward. It was working fine before I tried implementing multiplayer.

Can Sprint Check I currently have:


This works on the server, but the client cannot sprint, it tries to but just stutters. Now if I remove the YDirection check it works fine, they can sprint and if they are crouched they can’t.

Here is how the Is Crouched is set:

YDirection set:

Server and Client calls:

This replication stuff is pretty new to me. I’ve tried to replicate the YDirection variable and tried RepNotify but that didn’t change anything (I probably did it wrong, but idk). I also tried to put the Character Movement into a Multicast call like the sprint and crouch are and that didn’t work either. So here I am, any ideas?

I guess I just had to finally ask for help to figure it out…

Solution was to move the check to when the Input Action is called like so:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.