Driwi
|
  |
| Joined: 30 Sep 2014 |
| Total Posts: 2 |
|
|
| 03 Oct 2014 04:32 PM |
I have this little bomb script as shown:
local Bomb = script.Parent local Mesh = Bomb.Mesh if Bomb.Parent == game.Workspace then Bomb.Touched:connect(function(Hit) if Hit.Parent:FindFirstChild("Humanoid") then if Mesh.Scale == Vector3.new(4, 4, 4) then wait(2) local BombExplosion = Instance.new("Explosion", game.Workspace) BombExplosion.Position = Bomb.Position Bomb:Destroy() end end end) end
Which is supported by this script, the one that increases the bomb's mesh size:
local Bomb = script.Parent local Mesh = Bomb.Mesh Bomb.Touched:connect(function(Hit) if Hit.Parent:FindFirstChild("Humanoid") then while wait(0.2) do Mesh.Scale = Mesh.Scale + Vector3.new(0.1, 0.1, 0.1) end end end)
What is the problem? The bomb continuously increases its mesh size without stopping. I have not recieved any output to post. |
|
|
| Report Abuse |
|
|
Subete
|
  |
| Joined: 10 Jul 2011 |
| Total Posts: 917 |
|
|
| 03 Oct 2014 04:55 PM |
"while wait(0.2) do"
use a for loop instead
or a repeat loop
or anything that isnt infinite |
|
|
| Report Abuse |
|
|
Driwi
|
  |
| Joined: 30 Sep 2014 |
| Total Posts: 2 |
|
|
| 03 Oct 2014 05:43 PM |
That only maade it so that the bomb only grows when a player touches it. I don't want that.
It still doesn't work, anyhow. |
|
|
| Report Abuse |
|
|
|
| 03 Oct 2014 05:48 PM |
local Bomb = script.Parent local Mesh = Bomb.Mesh Bomb.Touched:connect(function(Hit) if Bomb.Parent == game.Workspace then if Hit.Parent:FindFirstChild("Humanoid") then if Mesh.Scale == Vector3.new(4, 4, 4) then wait(2) local BombExplosion = Instance.new("Explosion", game.Workspace) BombExplosion.Position = Bomb.Position wait(1) Bomb:Destroy() end end end) end |
|
|
| Report Abuse |
|
|
|
| 03 Oct 2014 05:55 PM |
this works
local Bomb = script.Parent local Mesh = Bomb.Mesh
Bomb.Touched:connect(function(Hit) if Bomb.Parent == game.Workspace then if Hit.Parent:FindFirstChild("Humanoid") then if Mesh.Scale == Vector3.new(4, 4, 4) then
wait(2) local BombExplosion = Instance.new("Explosion", game.Workspace) BombExplosion.Position = Bomb.Position Bomb:Destroy() end end end end)
.---------------------------------------------------------------------- local Bomb = script.Parent local Mesh = Bomb.Mesh Bomb.Touched:connect(function(Hit) if Hit.Parent:FindFirstChild("Humanoid") then while wait(0.2) do Mesh.Scale = Mesh.Scale + Vector3.new(0.1, 0.1, 0.1) end end end) |
|
|
| Report Abuse |
|
|