My game uses NetworkOwnership as players kick a ball, but I noticed when one player wins it back they win it from really far on others screen, and NetworkOwnership has been laggy for me in general. Is this due to input lag?
Thatās the problem. The previous owner of the ball still has ownership so the position of the ball has to be sent from Client ā Server ā Client instead of Server ā Client. Hopefully Iām correct? I havenāt really worked with NetWorkOwnship on a large scale
How do I implement this?? This is my current script:
if not ReactDeclined and not Cooldown and Distance < 10 then -- ReactDeclined is when the players ping is too high, Distance checks from the ball as well
SoundEvent:FireAllClients(true)
ReactModule:BallEffect(ball)
if ball.Owner.Value ~= player then -- Owner is an ObjectValue, it checks if the value doesn't equal the player
ReactModule:MakeReactBubble(player , ball)
ReactModule:BallEffect(ball)
end
Module script:
function React:MakeReactBubble(player , ball)
ball:SetNetworkOwner(player)
SoundEvent:FireAllClients()
ball.Owner.Value = player
ball.Cooldown.Value = true
-- other useless code that works below here
end