Sound Waiting?

Hey guys, i’m making a small “Health Box”, if you walk in it you get 100 health, and it plays a sound, but, when I walk in, the sound plays like really fast after eachother. How can you make a timer that waits 4 seconds between each sound-play? Would be awesome.
Code:
[lua]function ENT:Touch( hitEnt )
if ( hitEnt:IsValid() and hitEnt:IsPlayer() ) then
hitEnt:SetHealth( 100 )
hitEnt:EmitSound(“garrysmod/save_load4.wav”, 500, 100)
end
end[/lua]

[lua]function ENT:Touch( hitEnt )
if ( hitEnt:IsValid() and hitEnt:IsPlayer() ) then
hitEnt:SetHealth( 100 )
timer.Simple (4, PlaySound )
end
end

function PlaySound ( hitEnt )
hitEnt:EmitSound(“garrysmod/save_load4.wav”, 500, 100)
end
[/lua] Should work.

I notice that you don’t tell it to stop. While they are touching the ent, it will constantly emit the sound. You have to deactivate it on touch, then reactivate after a period of time, otherwise that’s the kind of problem you’ll have.

Assuming that ENT:Touch runs the way I assume.

EDIT: Bah, forgot about StartTouch. Yeah, I’d use that instead. Thanks, Smellyzarg.

What Lost says is correct I think, use ENT:StartTouch

It didn’t work, it didn’t gave an error either.
StartTouch worked, thanks guys.