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.
COMMUNITY QUESTION
Can someone point me to a wiki about touching? For instance two bricks have to keep touching.
2 answers
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
1 comment
0
Please do not post incorrect code.
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.
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
Theres a search bar y'know.
hint; a variable,
Touched, andTouchEndedvariable? what variable