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.
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
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
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?
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.
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.
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
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.
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