Blueprint scripting is different on dedicated server

There are 2 things that work fine on listen servers but don’t on dedicated servers. The first is that a certain variable doesn’t seem to replicate properly. The variable is supposed to track the direction the player is looking so when he throws a ball, it throws it exactly where he is looking. On listen servers it works fine, on dedicated servers it just throws it towards the ground.

The second issue is that when the player throws the ball, it detaches the ball from the character in the wrong position. I was having this issue on listen servers as well but managed to find a workaround. It gets the balls world location, then detaches, then sets it to that location so it looks like it is leaving his hand like it would in real life. On dedicated servers, the ball detaches and “spawns” near or “teleports” to the players hips making it look weird and un-natural.

Why is this happening and how can I fix it? Any help is appreciated.