how do i make a script that tells when a part touched another part and it will detect the part.
for example: the tools part touched the part on the ground and the script will make sure that the part that touched it is the tools part otherwise if its not then it won’t run the script.
here you can take this script and redo it if you want or you can add to it.
local clickdetector = script.Parent.ClickDetector
local goto = script.Parent.Parent.garbagegoto
local godown = script.Parent.Parent.garbagegoto2
local part = script.Parent.Parent.Union
local player = game.Players:FindFirstChild('Humanoid')
local tool1 = game.StarterPack.sweeper1
local toolP = tool1.Model
clickdetector.MouseClick:Connect(function(player)
part.Position = godown.Position
wait(5)
part.Transparency = 0
part.Position = goto.Position
end)
script.Parent.Touched:Connect(function()
end)