I am scripting a football and it shoots perfectly when I stand still. However when I am walking, the ball bounces and glitches.
I also notice the ball is really laggy, it freezes in mid-air or rolling in land.
I used this script to add a BodyVelocity on the ball.
Yeah to add on, if you notice as the ball rolls a certain distance away from the player you can notice the switch from client ownership to server ownership as seen in the first video, this causes the freezing as the server now has to calculate the physics and stuff.
I just changed the ball’s NetworkOwnership to the player, it’s smoother now but the delay still exists.
Sometimes the ball works really well but sometimes it’s terrible especially when the player is walking.
What should I do now?
You could try distancing the ball from the player when the ball is being released, Or making it so. when the ball is released it has like a CanCollide off wait time. So it doesn’t collide with the character.