- PLEASE create a backup file or save your game if you are going to run this script in case Roblox Studio freezes.
- This script creates new collisions for ‘walls’ if their thickness is below or equal to a certain threshold, etc. You can run this script in the command bar, place it in a new script in ServerScriptService if you want it to run when the game is played, or do both if needed.
- This script was originally made for killhouses but it can be used for other types of buildings or structures. Nevertheless, you'll still need to check if their extended collision parts are created correctly and so on (by making them visible).
AI Generated readme:
A simple Roblox Studio utility script that automatically creates invisible "collision extender" parts for thin walls to improve player collision reliability.
This script detects thin, collidable, anchored parts that appear to be walls and adds slightly thicker invisible collision parts around them so that your Roblox avatar's arms doesn't go through the walls.
Always save or create a backup of your place before running this script.
Roblox Studio may freeze or become unresponsive while the script processes a large number of parts.
- Detects thin walls based on size and orientation
- Creates invisible, non-query, non-touch collision parts that are slightly thicker
- Ignores decorative or non-wall parts (e.g., parts with ClickDetectors, Sounds, CylinderMeshes, etc.)
- Only affects solid (Transparency = 0), collidable, anchored BaseParts
- Skips very small parts (volume < 8.9 studs³)
- Places all new collision parts in a folder called
NewCollisionFolderin Workspace for easy management/cleanup
- Open your place in Roblox Studio.
- Open the Command Bar (View → Command Bar).
- Paste the entire script into the command bar.
- Press Enter to execute.
- In ServerScriptService, create a new Script.
- Paste the script code into it.
- The script will run every time the game starts (in Play mode or on a live server).
You can use both methods if desired.
You can tweak these values at the top of the script:
local tilt = 10 -- Tolerance in degrees for wall orientation detection
local thickness = 2.4 -- Maximum thickness considered "thin" and the new collision thickness- Lower
tilt→ stricter alignment required (walls must be more perfectly axis-aligned) - Higher
thickness→ more walls will get extended collisions
- Clears any existing
NewCollisionFolder. - Creates a new
NewCollisionFolderin Workspace. - Scans all descendants of Workspace.
- For qualifying thin walls:
- Clones the part
- Makes it fully transparent and disables shadows/fluid/touch/query
- Increases thickness in the thin dimension
- Names it "NewCollision" and parents it to the folder
To remove all generated collision parts:
game.Workspace:FindFirstChild("NewCollisionFolder"):Destroy()Or simply delete the folder manually in Explorer.
- The script self-destroys if placed as a Script (commented out by default).
- Generated parts have
CanQuery = falseandCanTouch = falseto avoid interfering with raycasts or touch events. - Works best on axis-aligned or near-axis-aligned walls.
This script uses GNU General Public License v3.0
Happy building! 🛠️

