Ball Magnet In my League

Is there a way to battle exploiters from magging the ball. The football tool uses touched event. I’ve made a football that doesn’t use that, but it’s inconsistent with detecting if it was touched or not. This has been a big issue in the league. Is there any way I can stop this or minimize.

#2 Herr_Bert

Well, the first thing that comes to mind is to use something like Oops!. You could create a Ray from the players feet (or head, or some other part that would be closest to the ball) to the ball and if the Ray hits the ball you know the player is at least in a position that would allow him to touch the ball.

However, this isn’t a 100% reliable method as if the player is to far away from the ball the Ray won’t hit it. Also, it wouldn’t detect if the player is on top of the ball, but that’s not a huge problem.

#3 AceRbx

Herr_Bert said:

Well, the first thing that comes to mind is to use something like Oops!. You could create a Ray from the players feet (or head, or some other part that would be closest to the ball) to the ball and if the Ray hits the ball you know the player is at least in a position that would allow him to touch the ball.

However, this isn’t a 100% reliable method as if the player is to far away from the ball the Ray won’t hit it. Also, it wouldn’t detect if the player is on top of the ball, but that’s not a huge problem.

Useful, but if you put the raycast at the part closest to the ball, it would be easy to exploit it.

#4 Rego_Dev

This is a pretty common exploit that many games have, and the only way to avoid it is to use a dedicated anti-exploit tool, like Synapse or Protosmasher.

#5 Herr_Bert

@AceRbx

You can still use the raycasting method, but instead of putting the raycast at the players feet, you could put it at the players torso. This way the raycast would be less likely to hit a part that’s close to the ball instead of the ball itself.

#6 AceRbx

Herr_Bert said

thats very helpful, thanks @xDeltaXen :skull:

I highly recommend using the ZonePlus module as opposed to the touched event. It uses the Spatial Query API, all you need to do is put an invisible, uncollideable part around the ball (can be a sphere, but must have CanQuery). See more here: ZonePlus v3.2.0 | Construct dynamic zones and effectively determine players and parts within their boundaries