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: Removing a connection line?

Previous Thread :: Next Thread 
devRaver is not online. devRaver
Joined: 08 Apr 2013
Total Posts: 531
08 Apr 2014 12:18 PM
Is it possible, if so could you tell me how?
I want to remove a connection line momentarily, then "reconnect" it.
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
08 Apr 2014 12:19 PM
local connection;
connection = script.Parent.Touched:connect(function(hit)
--Code
end)

connection:disconnect()
wait(2)

connection = script.Parent.Touched:connect(function(hit)
end)
Report Abuse
devRaver is not online. devRaver
Joined: 08 Apr 2013
Total Posts: 531
08 Apr 2014 12:22 PM
I recall reading a page on the wiki, I think stating; that you're no longer able to use :disconnect().
I could be wrong. :/
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
08 Apr 2014 12:24 PM
You can.
Report Abuse
devRaver is not online. devRaver
Joined: 08 Apr 2013
Total Posts: 531
08 Apr 2014 12:25 PM
local function error()
if l.Value < 500 then
connection = script.Parent.MouseButton1Click:connect(click)
d = false
function click()
if d == false then d = true
if s.Value > 1 then
s.Value = s.Value - 1
end
end
d = false
end
end)
connection:disconnect()
wait(2)
connection = script.Parent.MouseButton1Click:connect(click)
end)

script.Parent.MouseButton1Click:connect(error)

Would this work?
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
08 Apr 2014 12:31 PM
I think what you want is debounce.

local function error()
if l.Value < 500 then
d = false
function click()
if d == false then d = true
if s.Value > 1 then
s.Value = s.Value - 1
end
end
end
end
wait(2)
d = false
end

script.Parent.MouseButton1Click:connect(error)

Report Abuse
devRaver is not online. devRaver
Joined: 08 Apr 2013
Total Posts: 531
08 Apr 2014 01:07 PM
Do you want me to post the whole script?
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
08 Apr 2014 01:08 PM
No and I realized an error in mine

local function error()
if l.Value < 500 then
d = false
if d == false then d = true
if s.Value > 1 then
s.Value = s.Value - 1
end
end
end
wait(2)
d = false
end

--Connection line here
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