Physics in GameMaker: Studio: Part 3 - https://www.yoyogames.com/tech_blog/85
In this last part of out three part mini-tutorial series about physics in GameMaker: Studio, we are going to explore joints, advanced physics world functions, and debug drawing. in this article, we are starting from scratch so create a new project and call it "physics_joints" or something similar. Now add a single room, and set the background colour to dark grey or black (you'll see why later), then close the room editor. We aren't going to use the physics tab in the editor to set up the physics world this time, but instead we are going to do it in code.