You’re missing a closing } on your OnControllerColliderHit method.
If you make sure all your code is properly and consistently paragraphed (which your sample is not) then errors like these should be very, very easy to spot.
Your lack of indentation makes it more difficult to figure out what’s going on that it needs to be. Maybe it’s not there, or it’s there and you forgot to wrap it in CODE tags like you did the first post? In any event, if you’re too lazy to make your code readable, we may be too lazy to read through it.
Sorry about that. I’m a complete beginner at programming anything. I’ve never had a class on it or anything. Hmmm, ill try to make it more simple though. Basically what i’m wanting to know is how to make a javascript in unity “Wait” for 1 second.
Update (also LateUpdate) runs every frame without exception, and therefore cannot be made to wait. Just put that code in OnControllerColliderHit; there’s no need for the “dead” variable. (Also you should remove that WaitForSeconds function; it doesn’t do anything and has no purpose since Unity already has such a function built-in.)