How to stop cornerglitching: A guide by an experienced corner glitcher

Corner glitching can be the bane for many developers who intend to create a game with areas locked off from access. Highly experienced players who have mastered the art of corner glitching gain the ability to pass straight through your well scripted group only doors, walls, etc. A lot of developers, however, fail to realize the very simple and useful methods that can be used to prevent players from breaking in to your building.

First, an explanation on what corner glitching is:
First, you need to have a goal, something that you want broken in to. For the purpose of this guide, we are going to be using this room.
image

Corner glitching simply works by making a 180 degree turn while hugging an exterior facing corner, as shown.

While very powerful, cornerglitching can be stopped by a large amount of methods, in which I will rank from top to bottom in terms of usability, features, etc.

Method 1: Cylinders
When you use a cylinder, you make it so that there is no longer a sharp corner for the player to perform the corner glitch on. For this reason, you can create very small, transparent cylinders that just barely cover the corners of your building, and this in itself will suffice in preventing this exploit.
image
The result of this, (after hiding it,) looks like this:

This method is extremely simple, and is very powerful in stopping corner glitchers from breaking into your buildings.

Method 2: Scripted Restricted Areas
While one of the first ideas that may come to mind to prevent players from breaking into an area is to write a complex system using Region3 that tracks the positions of all player and moves them outside of areas if they are inside of them, there is a much, much simpler solution: clientsided blocks!

With something like this, we can then write some code to simply delete this part on authorized clients.

if game.Players.LocalPlayer.Name ~= “Player2” then – Make something like this that checks group ranks, etc.

game.Workspace:WaitForChild(“SecureArea”):Destroy() – You’d likely want to set up a loop here, but this is good for demonstration.

end

The effect of this is very simple, but extremely effective.


Method 3: Not having exterior facing corners
This method is not applicable to all areas, and will work only in doorways in hallways or other such places where you can otherwise not cornerglitch, but it is still very useful. By using transparent (or visible) changes to make outer surfaces flat, we can make it impossible to cornerglitch.

Method 4: Unions, lol!
Unions seem to operate with collisions differently, and therefore are immune to cornerglitching. This is probably the easiest method, but generally union spam is seen as a negative, and should be avoided unless if other solutions are not ideal.

Besides the methods mentioned in this topic, there are a variety of other methods, some more or less complex, that you can use to prevent players from corner glitching in your games.

88 Likes

I get that this is about cornerglitching, however I think it’d be worth mentioning that this is only effective against a small subset of game-breakers, and is not effective should your game garner a much more common enemy: exploiters. Any exploiter could simply delete the wall / part and walk on in, so if you’re attempting to truly close off an area, you will need a server script set up to detect people walking in.

That’s not the subject of this tutorial, though, and as for the tutorial itself, very well done, and very concise; for example, I didn’t even think about unions not allowing clipping. I just felt exploiters worth mentioning, and I don’t mean to detract from you by mentioning this.

16 Likes

Exploiters, luckily, are generally much more blatant (they won’t spend the time to “teleport” after hugging a corner, they’ll just walk straight through your wall,) but yes, these solutions that rely on the physics and client but don’t actually stop exploiters. My inspiration for this was after showing up to a cafe game that I had corner-glitched in previously, just to find that they had spammed invisible walls everywhere which only hurt actual players as I found a new solution inside within a minute.

8 Likes

Never heard of the corner glitch, but it looks like it relies on shift lock - disabling shift lock could be a potential “method 5”?

I like the different ways you attacked the problem. Obviously exploiters will need to be regulated by some server scripts but method 1 in particular is a good easy-fix solution for players who may unintentionally get stuck, or for those who don’t want to risk downloading exploits.

6 Likes

In games like Prison Life, i was able to do this glitch on mobile, so probably not an ideal method.

5 Likes

While I prefer to use shift lock, you can also go into first person. All that really matters is that you 180 before the next physics update afaik

1 Like

So just the angle eh, I see

I’ve played around with shift-lock in custom physics and it leads to random flinging sometimes due to it’s snap characteristic. I guess it’s something separate.

3 Likes

If I change my game’s rig type to R15 will it prevent cornerglitching?

3 Likes

No, it makes it harder but it’s still possible

3 Likes

Wow, how did I not even think of the method of deleting a client sided brick? Earlier I had the complex region3 system you described. Thanks for the tutorial!

By the way, what angle corners does it have to be to corner glitch? Is it only 90 degree corner?

It doesn’t matter what is visible, as long as you make the 180 degree turn on the corner of a part, from my experience. Since all parts are rectangular, as long as you have the access to a corner, even if that corner intersects to make a different angle, it’s still possible to cornerglitch on it.

Another simple trick that passively prevents corner glitching could be setting up anti noclip walls. You have your walls then a kill brick sandwiched inbetween them. If anyone tries to glitch through the wall (like attempting cornerglitch) if the user ends up touching the killbrick inbetween it kills the player. I have seen some group places use that tactic like the PIA rooms in Pinewood HQ

2 Likes

First method is invalidated if they are good enough glitcher. There is something called “side clipping”. Its basically corner clipping but sideways instead of forwards and can be used to bypass cylinders too. Also, you can corner glitch on a wall without any corners sticking out, its just a lot harder. Using unions would be optimal, if it weren’t for two glitches known as “freeze clip” and “laugh clip.” Both of these can be used to clip through 1-2 stud walls. Completely bypassing unions. I have heard rumors of a 30 stud wall clip, but have yet to see any evidence. Basically to be safe, just track if someone goes in and kill them or something if they aren’t authorized. Much simpler than accounting for every glitch, and trust me there is a lot.

2 Likes

Sorry for the late reply, but this is the “30 stud wall clip” that you’ve heard rumours about. I felt like adding this to the conversation because none of the methods to prevent corner glitching shown in this post can stop this.

I Made a anti-glitching system that can prevent from corner-glitching

1 Like

its not fixed as you can see, to walk is a bit annoying.

Roblox patched corner clipping across all games. (As of this time)

2 Likes