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.
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?
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
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.
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)
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?
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.
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)