Trying to make a "touch detector"

I’m trying to make a “touch detector” with my building tool i created.

I used .Touched and .TouchEnded, and those seemed unreliable.
I’ve searched, and i can’t find a lot of information on it.

I used :GetTouchingParts(), but i don’t really know how to use it.

Any help would be appreciated.

Tool: https://gyazo.com/533a50de4d8afa4c911a71db02107c25)

game.Workspace.Part.Touched:Connect(function()
-- put what you need
end)

oh sorry my bad i didn’t get what you need, well you can try an add an invis barrier that when your trying to place something it turns red and won’t let you.

1 Like

You could have it so when you try to place a build down, check if if’s nothing touching any parts via using the return of GetTouchingParts(), which returns all the parts that are touching a certain part, and check if nothing is touching via checking if the length of the table returned is 0, meaning empty, if it is empty, place it down

1 Like