|
| 22 Jun 2015 09:39 PM |
I made a pretty simple script, and it doesn't work. I'm just here like"what the hell breh". Will someone tell em what's wrong with it.
http://pastebin.com/SMBPvvRR |
|
|
| Report Abuse |
|
|
|
| 22 Jun 2015 09:53 PM |
(For anyone who doesnt want to goto the pastebin, I have put it on the post for you) local Bomb=script.Parent Instance.new("ClickDetector", Bomb) myBoolean=true function BOOM() while myBoolean do local Explosion=Instance.new("Explosion", Bomb) Explosion.Position=Bomb.Position end function Enable(speaker, message) if message == "Explode!" then BOOM() end end function Disable(speaker, message) if message == "Disable." then myBoolean=false end end Game.Players.PlayerAdded:connect(function(Player) Player.Chatted:connect(function(Message) Enable(Player,Message) Disable(Player,Message) end) end) |
|
|
| Report Abuse |
|
|
| |
|
radar001
|
  |
| Joined: 04 Sep 2011 |
| Total Posts: 718 |
|
| |
|
Jammer622
|
  |
| Joined: 19 Nov 2008 |
| Total Posts: 1739 |
|
|
| 22 Jun 2015 10:46 PM |
Well, first off, it looks like you're one "end" short on line 9. Second, without a wait() function for the while-do loop on line 6, you'll probably crash the game. |
|
|
| Report Abuse |
|
|
|
| 23 Jun 2015 02:29 AM |
How 'bout this?
local Bomb=script.Parent myBoolean=true function BOOM() while myBoolean do local Explosion=Instance.new("Explosion", Bomb) Explosion.Position=Bomb.Position wait(3) end end function Enable(speaker, message) if message == "Explode!" then BOOM() end end function Disable(speaker, message) if message == "Disable." then myBoolean=false end end Game.Players.PlayerAdded:connect(function(Player) Player.Chatted:connect(function(Message) Enable(Player,Message) Disable(Player,Message) end) end)
Could someone test it for me, I'm on IOS. |
|
|
| Report Abuse |
|
|