OnDisconnected() isn't working

Ok, so I am doing a thing with the OnDisconnected() function, and it doesn't register. It gives me an error saying that the namespace can't be found. I don't know how to attach a script to the thing, so if you're looking at this, can you please tell me how to add scripts onto here so you can be able to understand my problem a little more. Thank you.