I need help fixing a bug with a Soccer ball

The ball I am coding is delayed, and I need some help solving this bug

So, how the ball works, is, First: it detects every single player (including self) if it is near each ball in the field through renderstepped magnitude checks of the humanoidrootpart. If you are the first person to touch the ball then you are the network owner of the ball which is stored in an objvalue inside the ball. Then when you touch the ball, it fires a remote which the ball receives, and fires back to the client (network owner) instantly. With the obj value said earlier, this handles the physics very nicely. It seems the ball works perfectly fine for the network owner’s side, however, the registration seems delayed by maybe half a second, which I don’t understand why since every client checks and fires at the same time they are at a certain range of the ball. Is there any solution to this issue?

1 Like

Are there any waits in any of your scripts related to the ball?

Nope, there are no waits, other than the debounce to hit the ball after you’ve already hit it. but like I said the ball works perfectly fine for the network owner, but not for non network owners.

1 Like

Not really a bug and there’s no fix for this. It’s simply Roblox network delay.

1 Like

I feel like a better way to go about this system for it to be less buggy is by using kicking keybind because roblox touch events are usually pretty buggy and laggy.

1 Like

Well, I’m not sure this is true, maybe it is, but when you handle the ball as the network owner, it looks smooth and fine, and the registration is fine with all clients, no delay, but when the non network owner handles it, there’s a first hit delay

1 Like

That’s because the network owner has it simulated under their client hence the smoothness. The others, including the server, have to wait for the physics update of the object.

1 Like

Sounds like a good idea, but we like to handle the ball this way, kind of like touch football

1 Like

It’s not an issue with touched events.

1 Like

You think touched event would be a better approach rather than magnitude checks?

1 Like

Should I use touched event through the client? or ServerSide

1 Like

Both. IIRC server-sided touched events still get the event from the client’s physics of whoever touched it, but that’s with a delay.

Thank you so much, it seemed like the client sided touch event worked

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.