of     1   

ernakou
#63722076Saturday, March 03, 2012 1:18 AM GMT

x=7 function onTouched(hit) wait(1) if x>0 then script.Parent.Transparency = 1 script.Parent.CanCollide = false print =("Respawn Points: ["..x.."]") x=x-1 wait(1) script.Parent.Transparency = 0 script.Parent.CanCollide = true elseif x<0 then script.Parent.Transparency = 0 script.Parent.CanCollide = true end end script.Parent.Touched:connect(onTouched) I've tried adding debounce to this several times... this is the working script before I tryed adding debounce.
KnightmareXD
#63722183Saturday, March 03, 2012 1:20 AM GMT

x=7 db = false function onTouched(hit) if not db then db = true wait(1) if x>0 then script.Parent.Transparency = 1 script.Parent.CanCollide = false print =("Respawn Points: ["..x.."]") x=x-1 wait(1) script.Parent.Transparency = 0 script.Parent.CanCollide = true elseif x < 0 then script.Parent.Transparency = 0 script.Parent.CanCollide = true end db = false end script.Parent.Touched:connect(onTouched) † KMXD †
DonnyTheDemented
#63722196Saturday, March 03, 2012 1:20 AM GMT

x=7 function onTouched(hit) wait(1) if x>0 then script.Parent.Transparency = 1 script.Parent.CanCollide = false print =("Respawn Points: ["..x.."]") x=x-1 wait(1) script.Parent.Transparency = 0 script.Parent.CanCollide = true elseif x<=0 then script.Parent.Transparency = 0 script.Parent.CanCollide = true end end script.Parent.Touched:connect(onTouched) you forgot to deal with x=0, which makes it stop
mrclover
#63723108Saturday, March 03, 2012 1:36 AM GMT

function onTouched(hit) wait(3) if x>1 then script.Parent.Transparency = 1 script.Parent.CanCollide = false print =("Respawn Points: ["..x.."]") x=x-1 wait(1) script.Parent.Transparency = 0 script.Parent.CanCollide = true elseif x<0 then script.Parent.Transparency = 0 script.Parent.CanCollide = true end end script.Parent.Touched:connect(onTouched)
KnightmareXD
#63723553Saturday, March 03, 2012 1:43 AM GMT

Did you guys ignore his post or something? † KMXD †
DonnyTheDemented
#63723997Saturday, March 03, 2012 1:50 AM GMT

@knight I just pointed out the elseif wouldn't fire since he didn't address what to do when x==0, and you already added the debounce (in hindsight I should have copied and fixed your version :P)
ernakou
#63724657Saturday, March 03, 2012 1:57 AM GMT

None of these appear to work... knight's looks close to what mine did when I was trying to add debounce. When I tried Knight's the output said there was a problem concerning line 3 and expecting an 'end'.
KnightmareXD
#63724722Saturday, March 03, 2012 1:58 AM GMT

Sorry, forgot an end. x=7 db = false function onTouched(hit) if not db then db = true wait(1) if x>0 then script.Parent.Transparency = 1 script.Parent.CanCollide = false print =("Respawn Points: ["..x.."]") x=x-1 wait(1) script.Parent.Transparency = 0 script.Parent.CanCollide = true elseif x < 0 then script.Parent.Transparency = 0 script.Parent.CanCollide = true end end db = false end script.Parent.Touched:connect(onTouched) † KMXD †

    of     1