Quick question to remove lag when switching between clients

Hi!
So I made a blade ball clone for fun. I have it where the ball picks a random player. Then sets the network owner to that player and do the ball movement code from there. If the player hits it back then it picks another random player, however, when I switch clients when hitting the ball there’s a slight lag with is annoying visually. Any ideas to fix that?

1 Like

Bumpbumpbumpbumpbumpbumpbumpbump

You could just make it run on the server as if the other player has bad wifi the ball will just lag. Just make it anchored. Make it run on the server cause its less likely for lag to happen. You can use lerping for the ball movement.

Hope I helped.

I tried that before. but the input lag was just too annoying to play with. And the ball was studdering kinda - server movement is bad.

bump
adwadwadawdawadawddwadwawadawdada

Probably a horrible thing to try to implement, but I believe in you!

Create a client version of the ball. Make it have the same velocity, position as the server ball. Since this ball is owned by the client, your shots should react instantly and fluidily.

If the other guy hits the ball back I think you can forgive a slight bit of delay