Like for a script to only work when two bricks in the work space are touching and they have to keep touching for the script to keep working.
To do this it’s pretty simple and there’s a search bar on the roblox wiki to where you can search functions and other scripting stuff. You only need this script inside one of the parts if you’re going to be very simple. Also, we don’t need to check for humanoids since you want to detect bricks touching each other
local var1 = workspace.PartOne local var2 = workspace.PartTwo script.Parent.Touched:Connect(function(part)) if hit.Name == var1.Name or hit.Name == var2.Name then CODE HERE else end end
If you want two bricks to keep touching, as the question says, use one of the forces to move them towards eachother. Not something simple that a basic scripter should try.
Closed as Not Constructive by hiimgoodpack, docrobloxman52, and lukeb50
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?