How Do you delete a block when someone touches that block with out a delete tool?
Touch you say?
1 | script.Parent.Touched:connect( function (hit) |
2 | h = hit.Parent:FindFirstChild( "Humanoid" ) |
3 |
4 | if h then |
5 | script.Parent:Destroy() |
6 | end ) |
Here is a revise. If the mouse it touching a brick. And you also are touching the brick. It will remove the brick. BEWARE OF BASEPLATE!!!
01 | local player = game.Players.LocalPlayer |
02 | local mouse = player:GetMouse() |
03 | local human = player.Character:findFirstChild( "Humanoid" ) |
04 |
05 | function OnMove() |
06 | if mouse.Target.className = = "Part" then |
07 | mouse.Target:connect( function (part) |
08 | local hum = part.Parent:findFirstChild( "Humanoid" ) |
09 | if hum ~ = nil and hum = = human then |
10 | part:remove() |
11 | end |
12 | end ) |
13 | end |
14 | end |
15 |
16 | mouse.Move:connect(OnMove) |