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 » Scripting Helpers
Home Search
 

Re: Script breaks (HELP)

Previous Thread :: Next Thread 
yoshiwars is not online. yoshiwars
Joined: 27 Jul 2009
Total Posts: 216
03 Jul 2013 01:59 PM

This script breaks when you click the button and it doesn't find any "Red" or "Blue" how can I avoid that it breaks when you click?

lim = game.Workspace.lineone.Limit
bin = script.Parent

function onClicked(mouse)

script.Parent.ClickDetector.MaxActivationDistance = 0

for i,v in pairs(workspace:GetChildren()) do
if v.Name == "Red" or v.Name == "Blue" then
v:remove()

wait(0.5)


script.Parent.ClickDetector.MaxActivationDistance = 10
end
end
end


bin.ClickDetector.MouseClick:connect(onClicked)
Report Abuse
misgav11 is not online. misgav11
Joined: 21 Apr 2011
Total Posts: 3418
03 Jul 2013 02:01 PM
is it a name or a brickcolor...............?
Report Abuse
yoshiwars is not online. yoshiwars
Joined: 27 Jul 2009
Total Posts: 216
03 Jul 2013 02:06 PM
the name of a part..
Report Abuse
dennis96411 is not online. dennis96411
Joined: 06 Mar 2009
Total Posts: 1079
03 Jul 2013 02:15 PM
lim = game.Workspace.lineone.Limit --I don't know what this does, but it's not used in this section.
bin = script.Parent

bin.ClickDetector.MouseClick:connect(function()
bin.ClickDetector.MaxActivationDistance = 0

for i,v in pairs(workspace:GetChildren()) do
if v.Name == "Red" or v.Name == "Blue" then
v:remove()
wait(0.5)
end

bin.ClickDetector.MaxActivationDistance = 10
end
end)
Report Abuse
yoshiwars is not online. yoshiwars
Joined: 27 Jul 2009
Total Posts: 216
03 Jul 2013 02:18 PM
My bad, ignore that..
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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