Prevent exploiters from attaching to other players/welding?

If possible, how would I prevent or even restrict the player from attaching themselves/welding to a player (an example of where this would be useful is a fighting game) to prevent them from “following” and getting easy hits off.

Is it possible to detect if and when this happens? I haven’t been able to search for a solution anywhere else either. I’d believe this may also help others in games that utilize “arresting people”, holding people, fighting games, and etc.

1 Like

There really isn’t a whole lot you can do since they have full control over their character model. Other users have had this problem mainly with exploiters “flinging” them. For that they just setup collision groups to prevent character collisions, however this seems a little different. I’ve never seen this exploit but I’m assuming they just position their character near another character (probably facing them?) to get quick accurate hits off.

My only solution for this would be some sort of Anti-Teleport. Monitor the position of characters on the server and make sure they don’t make bizarre unexpected movements. This could help with the initial “attaching”. I know some people do simple client-side checks to make sure players aren’t creating certain objects in their character or other characters (such as strange welds.). Obviously you shouldn’t trust the client so this suggestion isn’t really recommended, as-well as the fact they could just position the character without any objects.

That being said, I know to this day even the most popular games that involve “Holding” other players such as games that use handcuffs still suffer from stuff like this. Hopefully my suggestions help.

1 Like

You could fix it by making Anti Teleport checks on Server and disable player collisions.
They are doing something like (stuff you can fix client sided):

  1. Character.Animate.toolnone.ToolNoneAnim.AnimationId = math.huge, you could make a check on this
  2. Instance.new(‘Tool’, Backpack), in your case they use your Tool
  3. Character:FindFirstChildOfClass’Accessory’.Handle, they parent that to the tool, you could make a check on this too
  4. They are modifying the Tool’s Handle (Properties: Massless, Parent, GripPos)

Client might not be the best way to protect your game, however, in this case it is good along with some server checks (think of it like a wall the exploiters have to pass through). Don’t rely on it too much and good luck.

1 Like

Do you think it’ll be possible to detect the players (Estimated) location relative to the “opponents” location to see if they’re moving/matching the same for some amount of period and if so, “lag” them back/make it to where its impossible for them to hit the opponent/vice versa?

Or would this be a little too much and I should just do normal checks, players in this game usually are meant to teleport so adding an anti-teleport isn’t the greatest idea, nor is client sided checks from what I’ve heard.

Make an anti-teleport on the server and ensure anytime that the server actually wants to teleport the player legitimately you can just change a value to turn off the anti-teleport for a short amount of time.

1 Like

How would the anti-teleport help if they’re always near each-other/fighting each-other?
(and couldn’t it cause false positives if the player were to lag?)

1 Like

This is a problem that may be hard to solve, I would recommend disabling player collisions for now.

Do the players in the fighting area need to be colliding with each other to attack?

(About the lag: you would make a system where it would tally the player’s detections and if they have over 2 or 3 in a given time you would know it isnt a lag issue and kick them)

No, I don’t plan on adding collisions to either characters at all.

1 Like

It seems like an issue that is unable to be resolved right now, I will let you know if I think of something.

1 Like

You can detect their position relative to other players but that could yield numerous false positives. If you handle your Anti-TP on the server then you can just whitelist them while you TP them so it doesn’t affect players just playing the game. I suppose if their RootParts CFrame relative to another Players RootPart doesn’t change then you could assume its “fishy”, however there would still need to be numerous things taken into account such as players standing still.

I’d take into consideration of adding an Anti-TP with a “white list”. Even if the player is standing still its better than having 2 players actively fighting to out of nowhere and someone coming up from behind and is “welded” there. I might be able to fix the false positives by giving it a larger margin of error + just a little lag back if it thinks the player is exploiting.

1 Like

As I said you could just tally up the detections and once they’ve been detected for teleporting more than 3-4 times either kick or warn them.

1 Like

I dont plan to kick them/show a warning message especially if its somehow a false positive (Gets flung somehow :man_shrugging:)

I just plan to “lag” them back, thanks for the advice though :+1:

1 Like

You could use ray casting to detect if a player teleports or otherwise goes through a solid part on the server.

With regard to preventing players from welding themselves to another player, you could attempt to prevent this by using DescendantAdded.

You’d check if said descendant is a Weld and check if the Part0 and Part1 values weld their character to another character. You’d want to also make the important exclusion of allowing parts in their character to be welded to themselves - for hats, etc.

This is only a concept idea and I’ve not tested this.