How to weld block to block(or part) via surface,

How do i make a proper weld system, that functions like, join surfaces on Roblox studio.
I want to make it so if a part is perfectly aligned to the block, and touching a that blocks surface, it’ll weld.


^^ This is why.

It should work like, detect anything perfectly aligned to its surface, and weld to it, and i mean anything.

7 Likes

does anyone know anything ab welds?

6 Likes

this might work: SurfaceWeld Module | Weld parts that are touching surfaces!

I remember hearing that roblox itself also has some sort of inbuilt function for this, but I can’t remember what its called.

oh yea also this How to get all parts that are touching surfaces like join surfaces tool works? - #4 by ModuleDaner

5 Likes

Doesn’t work, surfaceweld was used in the video
Can you try to remember the feature?
Same method the surfaceweld does, wouldnt work

5 Likes

Wait, I’m a bit confused, is the issue being that you are not supposed to be welded when doing what you did in the video, or is the issue how the first time you were pushing the blocks, you were supposed to be welded?

5 Likes

Basically, like. Its supposed to weld depending on the angle of the block, if its touching it perfectly when its placed, and its angled correctly, so both surfaces are touching, it’ll weld

Sort of like classic welding

5 Likes

From what I can tell, it is welding correctly in the video? (Or is it supposed to weld to the baseplate?)

(Because it does look like its welding to every parralel surface that it touches, excluding the baseplate)

4 Likes

The surface has to be flat, the character was entirely enveloped, without any sort of filter to decide if a surface was even being touched. If the surfaces are flat and parrarel on eachother, it should weld.

4 Likes

I see. I suspect it might actually be welding with the back surface of your character rather then the front on.

If I understand correctly, couldn’t you just check to see if the 2 parts are intersecting?

4 Likes

Not sure what you mean here, could i get a example?

4 Likes

Just use something like getPartsInParts to check if the 2 objects intersect (like, are inside each other) in any way before welding.

That, or I might be misunderstanding what you mean by “entirely enveloped”, considering the surface of the character’s Torso is techinically flat.

4 Likes

Like this, for example, placement should be like this.

4 Likes

Are the blocks in a separate folder to everything else?

4 Likes

In that case, I have no idea, as from what I can tell, the surface is perfectly aligned on both cases, but only works when you’re sitting. Is there meant to be any method of welding things on yourself without sitting down? If not, just check if the object you’re welding to has a humanoid, and if so, only weld to it if it is currently sitting down. (I’m unsure how SurfaceWeld specifically works, but I assume you’d probably have to change the module a bit so that it would check for each individual surface it is welding to wether or not it has a humanoid and is sitting)

4 Likes

When you sit, the character is angled perfectly to the grid, to allow it to snap to the block, its really just about, if the angle is straight, and if its touching the surface of the block, it’ll weld. Any ideas?

4 Likes

I’m pretty sure you’ve already achieved that in this case (or atleast, somewhat). Perhaps try to check in the SurfaceWeld module if it has any sort of leniency towards the angle of the 2 surfaces, and if so, decrease that.

From what I can tell, the reason you’re even being welded in your original video is because some surface on your torso IS perfectly aligned.

2 Likes

The surface weld module is just a getpartsinbox thing and just welds whatever without any thought, lol :sob:

2 Likes

WHAT
uhhhhhh

I can’t really think of any logical solution that doesn’t involve a bunch of weird raycasting, and all of those would be really weird as well.

Perhaps take a look at all the different functions such as getPartsInParts and GetTouchingParts. Perhaps they would have different behaviour on what they consider “touching” (some might consider surface touching as still “touching” while some might require intersections?) You could also perhaps try raycasting yourself to see if they’re actually intersecting in any way (make the raycast area slightly smaller so that if they’re just touching on the surface it wont count maybe)

2 Likes