|
| 11 Sep 2012 04:45 PM |
There is this script ive ben working on that is suposed to break after 3 or so bullet hits. It does not work. Can you post the fixed script in the comments? Also, is 85 a good total?
dm = 0 function onHit(part) vX = math.abs(part.Velocity.x - script.Parent.Velocity.x) vY = math.abs(part.Velocity.y - script.Parent.Velocity.y) vZ = math.abs(part.Velocity.z - script.Parent.Velocity.z) totalVelocity = vX + vY + vZ if totalVelocity >= 85 then dm = dm + 1 end
if dm >= 3 then script.Parent.CanCollide = false script.Parent.Sound:play() wait (2) script.Parent:remove() end end
script.Parent.Touched:connect(onHit) |
|
|
| Report Abuse |
|
|
|
| 12 Sep 2012 02:52 PM |
| Oh well. Everyone is to dumb to fix it. |
|
|
| Report Abuse |
|
|
| |
|
Cheater
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 5258 |
|
|
| 12 Sep 2012 03:28 PM |
| A small infrmation. You know the whole script will run, even if it's not a bullet that touches it. |
|
|
| Report Abuse |
|
|
|
| 12 Sep 2012 04:19 PM |
The brick is anchored and in mid-air. It looks like it is touching the building, but it is 0.2 studs away from it. It is a railing for a building.
Even if it runs while nothing is happening, It will retrun and wait for another bullet to hit. Just like lava. |
|
|
| Report Abuse |
|
|