That's one big link statement, I don't think it's supposed to be like that.
Let me try.
[lua]local deb = false
function onCollide(hit)
if hit.Name == "Body" and deb == false then
deb = true
game.World.Button1.Color = Color(0,255,0) --green
sleep(1)
deb = false
game.World.Button1.Color = Color(255,0,0) --red
end
end
link(game.World.Button1.Collided, onCollide)[/lua]
I think that's correct.
By the way, you misspelled "deb = false" and wrote "dep = false" towards the end.
Let me try.
[lua]local deb = false
function onCollide(hit)
if hit.Name == "Body" and deb == false then
deb = true
game.World.Button1.Color = Color(0,255,0) --green
sleep(1)
deb = false
game.World.Button1.Color = Color(255,0,0) --red
end
end
link(game.World.Button1.Collided, onCollide)[/lua]
I think that's correct.
By the way, you misspelled "deb = false" and wrote "dep = false" towards the end.


![[Image: 76561197975251923.png]](http://badges.steamprofile.com/profile/default/steam/76561197975251923.png)
![[Image: n54lfl.jpg]](http://oi53.tinypic.com/n54lfl.jpg)
![[Image: k1ouq9.jpg]](http://oi55.tinypic.com/k1ouq9.jpg)