Any alternates to network ownership?

Hi, I am making a football game, and if the player touches the ball on their client, it fires a remote event giving them network ownership, but the problem is if the player is laggy the ball lags, and if a player gets the ball, it appears they got it from far on other peoples screens.

I was wondering if there are any alternates I can use to network ownership, or if I could reduce the lag.

Any help would be appreciated, thanks!

2 Likes

im wondering why you would wanna change the network ownership? it seems like that would cause your lag problem. have you already tried keeping the ball’s network ownership to the server?

Because if I keep network ownership to the server, the ball will be noticeably laggy and with setting NetworkOwnership to the player who has the ball, it doesnt make the ball appear laggy

1 Like

even with the player who has the ball having network ownership it causes problems?

1 Like

Yes, when the player gains ownership and takes the ball from someone else, they see that the ball is taken from them from a further distance

1 Like

alright, does the ball have it’s own physics? because to fix this you might have to use a system like super striker league where the ball just stays infront of the posessor and only has physics when it’s kicked by the posessor

1 Like

yes. when the player kicks the ball for example, it applies a bodyforce to the ball, and i cant really have the ball stay infront of the possesor

here is an example: (ball doesnt lag for 1 player)

2 Likes

if you cant keep the ball in front of the posessor thats fine but i think you will have consistent problems with it seeming like you were tackled from very far away. is the distance that it seems you are tackled from very far or just slightly abnormal?

1 Like

No just abnormal, I think it is down to inputdelay though, and players having high ping. But is there any way to make NetworkOwnership of the ball smooth, if you tackle the ball from someone for example the ball doesnt have any issues.

1 Like

Handle the ball locally on each client, and make a custom physics module on the server. That’s how I did it, and it works quite well!
Roblox physics is great for many things, but not for sports.

2 Likes

I dont think so, what I suggested above is about it. does the ball lag for other people who are watching the posessor kick the ball?

shirou seems to know better than me so follow what he says instead

1 Like

no, the physics are fine, its just that when you change ownership of the ball thats when other plays see that the player who has won the ball has reached it from a small distance

and sometimes when the player touches the ball, it doesnt set them as the network owner

2 Likes

try handling the ball locally on each client like shirou said but show me the code you use to switch network ownership

1 Like

I am not on studio right now, but when the player touches the ball with their left or right leg, (my game is r6) if they are not the network owner of the ball it fires a remote event which makes them the owner of the ball, but if they are already the owner of the ball, then physics are handled locally for them.

2 Likes

shirou recommends handling it locally for ALL the clients not just the network owner. try asking him to elaborate on that as he seems to have solved this issue before