of     2   
chevron_rightchevron_rightchevron_right

carstorm
#40158953Sunday, January 02, 2011 3:26 AM GMT

What would create more lag to open a door: A click detector or a touched event?
qrcrist
#40159064Sunday, January 02, 2011 3:27 AM GMT

The lag would be created opening the door if any lag is created.
crazypotato4
#40159175Sunday, January 02, 2011 3:29 AM GMT

Since the Touched event fires every time it's touched, and when you touch something, the Touched event will fire a bunch of times, I'd suggest the MouseClick event. Plus, ClickDetectors are cooler :3
carstorm
#40159234Sunday, January 02, 2011 3:29 AM GMT

Ya which one of would cause less lag. In other words which one do you recommend I use!
CardCaddy
#40159541Sunday, January 02, 2011 3:33 AM GMT

Neither, both are ugly events.
crazypotato4
#40159581Sunday, January 02, 2011 3:34 AM GMT

@Card: Then what would you suggest?
artoodetoo
#40159615Sunday, January 02, 2011 3:34 AM GMT

i suggest clicker, since it is cooler, and it only runs the function once per click.
carstorm
#40160133Sunday, January 02, 2011 3:41 AM GMT

Ok thank you clicker to open door it is!
carstorm
#40161538Sunday, January 02, 2011 3:58 AM GMT

I tried to make the script but it's not working and there is no output. door = script.Parent.Parent open = false function onClick() if not open then door.Transparency = 1 door.CanCollide = false wait(2.5) --automatically closes the door after 2.5 seconds door.Transparency = .4 door.CanCollide = true else door.Transparency = .4 door.CanCollide = true end open = not open end script.Parent.MouseClick:connect(onClick)
SarahAngel
#40161810Sunday, January 02, 2011 4:01 AM GMT

.ClickDetector.MouseClick -- for your connection
SarahAngel
#40161940Sunday, January 02, 2011 4:02 AM GMT

'open = not open' --don't understand this line?...
artoodetoo
#40161945Sunday, January 02, 2011 4:03 AM GMT

correction: ----------- door = script.Parent.Parent local open = false function onClick() if not open == true then retun end --you forgot "== true" and script wont work if not false door.Transparency = 1 door.CanCollide = false print("door opened") wait(2.5) --automatically closes the door after 2.5 seconds door.Transparency = .4 door.CanCollide = true print("door closed") open = false end script.Parent.MouseClick.Clicked:connect(onClick) --you forgot ".Clicked"
carstorm
#40161954Sunday, January 02, 2011 4:03 AM GMT

@sarah When I did that I get this error Workspace.GasDoorRight.ClickDetector.openDoor:18: '=' expected near '..'
artoodetoo
#40162040Sunday, January 02, 2011 4:04 AM GMT

*quick edit* door = script.Parent.Parent local open = false function onClick() if not open == true then retun end --you forgot "== true" and script wont work if not false open = true --forgot to put this in door.Transparency = 1 door.CanCollide = false print("door opened") wait(2.5) --automatically closes the door after 2.5 seconds door.Transparency = .4 door.CanCollide = true print("door closed") open = false end script.Parent.MouseClick.Clicked:connect(onClick) --you forgot ".Clicked"
SarahAngel
#40162083Sunday, January 02, 2011 4:04 AM GMT

try: .ClickDetector.MouseClicked
artoodetoo
#40162271Sunday, January 02, 2011 4:07 AM GMT

the correct detector is '.Clicked' so it would be 'ClickDetector.Clicked:connect(yadda yadda yadda)'
carstorm
#40162287Sunday, January 02, 2011 4:07 AM GMT

@artoodetoo This is the output Workspace.GasDoorRight.ClickDetector.openDoor:5: '=' expected near 'end'
artoodetoo
#40162388Sunday, January 02, 2011 4:08 AM GMT

did you use my quick edited one?
carstorm
#40162432Sunday, January 02, 2011 4:09 AM GMT

ya
artoodetoo
#40162507Sunday, January 02, 2011 4:10 AM GMT

try taking out 1 =, the reply result
artoodetoo
#40162525Sunday, January 02, 2011 4:10 AM GMT

then* reply the result
carstorm
#40162591Sunday, January 02, 2011 4:11 AM GMT

1 = which line is that on (I don't see it)
ap1ratesl1fe
#40163011Sunday, January 02, 2011 4:15 AM GMT

door = script.Parent.Parent local open = false function onClick() if open then return end--changed open = true door.Transparency = 1 door.CanCollide = false print("door opened") wait(2.5) door.Transparency = .4 door.CanCollide = true print("door closed") open = false end end--forgot end, here door.ClickDetector.MouseClick:connect(onClick)--you have ClickDetector in the door, right?
artoodetoo
#40163033Sunday, January 02, 2011 4:16 AM GMT

remove one equal sign from 'if not open == true then return end'
MPCHCandVLC
#40163174Sunday, January 02, 2011 4:17 AM GMT

@Original Question; As long as you know what you're doing and don't make your event functions overly complicated, it really won't matter.

    of     2   
chevron_rightchevron_rightchevron_right