Hello Developers!
Over the next several months we will be taking some steps to begin phasing out Part Surface Types. As you may know, all parts have six surfaces that can be set to one of the following Surface Types: Glue, Studs, Inlets, Universal, Weld, Smooth, Hinge, Motor, and SteppingMotor.
Roblox has a joining system where touching parts connect together and different types of joints are created based on the surface types of the two touching parts. Sections of this feature have been removed in the past as we moved towards the Constraint system, other parts have been left with some usability issues, and it’s continually confusing for new developers. You can control this behavior with a three-state drop-down next to the Move, Rotate, and Resize tools on the Studio Ribbon. Our initial changes focus on this dropdown and how it controls building in edit mode.
What is changing?
- The JoinMode drop-down will become a toggle that turns surface joining on and off. Essentially flipping between the Always and None options that appear now. We are removing the Surface option, and changing the behavior of the Always option. None will continue to work as it does now.
- When surface joining is on, all planar touching flat sides of parts will weld together, regardless of SurfaceType. (This does not affect Hinge, Motor, SteppingMotor)
- Glue, Studs, Inlets, Universal, Weld, and Smooth surfaces will all create Weld instances.
- Spheres will not surface-weld to anything. The rounded sides of cylinders will not surface-weld, but the flat end sides will.
- There were certain cases where flat touching sides would still not join. THis was a bug, and now this change will guarantee that all touching flat sides will join.
- You will never be able to surface join parts that are connected by a constraint (This is generally true now, but certain combos allow a constraint and ManualWeld).
- Stud, Inlet, Universal, Weld, and Glue Surface textures will only appear on Plastic material parts, both in-game and in Studio. Right now these Surfaces appear on all Materials when editing in Studio, but vanish in-game.
-
Workspace.JoinToOutsiders
will follow these new joining rules. Passing inEnum.JointCreationMode.All
orEnum.JointCreationMode.Surface
will both have the same behavior which equates to Join Always. MakeJoints will still follow old joining rules as a backup for legacy games.
What’s not changing?
- Old games and toolbox models will not be impacted and keep their original surface joints. This only affects building new things in Studio.
- Hinge, Motor, and SteppingMotor surfaces will continue to make their respective Rotate joints
- Calling MakeJoints will still create legacy surface joints according to the original joining rules.
- You can still assign surfaces to plastic parts for visual aesthetic.
Further down the road, you can expect more changes that will slowly phase out Surface Joints all together, so you should refrain from relying on them for your new games.
I’m still confused, what should I be doing instead?
In general, you should try to use WeldConstraints. The WeldConstraint tool from the Constraints section makes it easy to select groups of parts you want weld. If you prefer the surface welding behavior, then turning on Join Surfaces will still do this, and will always create a Weld regardless of SurfaceType.
If you are generating parts via script, again it is preferred that you use WeldConstraints, otherwise you should use JoinToOutsiders to create welds on surfaces. Do not use MakeJoints unless you specifically need to support legacy joint behavior.
TL;DR:
After this change, SurfaceTypes will have no absolutely no impact on building, and only exist as a visual aesthetic (with exception for Hinge and Motor). Auto-welding can still occur if turned on, but the SurfaceType will have no control on the type of joint or weld being created.
If you have more questions, please look through this thread and see if you can find your answer here, or just try it out for yourself!
Further discussion has been moved here.