What do you want to achieve?
When ball1 moves towards ball2 and hits it. It should apply the force immediately without delays.
What is the issue?
When ball1 moves towards ball2 and hits it. It pushes them back but It takes time to replicate and receive the physics results.
What solutions have you tried so far?
Tried using SetNetworkOwner on touched. So when player1 touchs 2. They take ownership of them but thats kinda dumb as both will swap ownerships. It ended up glitchy.
game.Players.PlayerAdded:Connect(function(pl)
pl.CharacterAdded:Connect(function(char)
char.PrimaryPart.Touched:Connect(function(part)
local hitpl = game.Players:FindFirstChild(part.Parent.Name)
if hitpl then
part.Parent.PrimaryPart:SetNetworkOwner(pl)
wait(1)
part.Parent.PrimaryPart:SetNetworkOwnershipAuto()
end
end)
end)
end)
It really seems there is not much to do. I have a few solutions that could work:
Set both parts network owner to nil (server): It should fix the delay time between hitting a ball as its being both ran on the same computer but will have the after effect of being controls for the ball to the player having latency depending on how bad the player’s ping is
Set both parts network owner to the player: Again, this should fix the delay time BUT it will result in the other player having TERRIBLE latency as not only the “control” signal moves to the server, but to the other client to be processed.
Your best hope is choosing solution 1 as it has the least amount of problems and most of the time server/client latency is low. It should only effect people with high latency such as 1000ms.