I’ve made a grid block placement system that works pretty well, however since the parts are unanchored (it’s going to be destructable by explosions etc.) The blocks placed don’t seem to stick together.
I’m not sure if I’m doing something wrong but I tried to make all the surfaces “Weld” but that doesn’t work, if you push the block they seperate.
Is there away to make blocks created by the player to stick together without being anchored somehow?
I’m not sure if there was a better way. Most of the old destruction games had their bricks unanchored, and when they were hit by the old rocket launcher the welds would break and the parts would go flying. I was sort of trying to recreate that.
There’s been some changes to how Part surfaces work. You can read about it here and in the linked articles.
When moving parts via scripts, you might be able to use Workspace.JoinToOutsiders to get them to weld to touching parts. I’d recommend creating weld instances between parts from the script explicitly, to get exact control over which parts do and don’t weld together.
What isn’t recommended, calling JoinToOutsiders or creating Weld Instances? I meant the new WeldConstraints, just completely forgot there used to be the old instances with ClassName “Weld”
That seems to be what OP is trying to do:
Just to clarify: creating WeldConstraint Instances or calling JoinToOutsiders is fine if you have to connect parts at runtime, right?
Yea it’s fine. My personal preference is to write my own “join to outsiders” function that uses WeldConstraints, simply because JoinToOutsiders will create the older Weld instances, and usually I don’t actually want every touching part to weld, just a few. Also I can see the WeldConstraints if I turn on Show Welds while playing, and I don’t have to worry about them getting deleted automatically if I move a specific part or any other reason. Using WeldConstraints gives you more explicit control on when you want to add/remove or enable/disable welds at run time.
But, there’s no issue with using the old Weld instances, performance or otherwise.