generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: What's the problem with this script?

Previous Thread :: Next Thread 
JacksAndJokers is not online. JacksAndJokers
Joined: 08 Sep 2011
Total Posts: 183
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
DeathsLASTwords is not online. DeathsLASTwords
Joined: 28 Jan 2012
Total Posts: 2701
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
Omnisxiii2 is online. Omnisxiii2
Joined: 03 Mar 2012
Total Posts: 542
22 Jun 2015 10:39 PM
Heh. IDK.
Report Abuse
radar001 is not online. radar001
Joined: 04 Sep 2011
Total Posts: 718
22 Jun 2015 10:44 PM
Thet indent tho...
Report Abuse
Jammer622 is not online. 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
JacksAndJokers is not online. JacksAndJokers
Joined: 08 Sep 2011
Total Posts: 183
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image