If a person is drunk or high on other drugs they are unable to make a free agreement to do something sexual with someone else. This means that a person cannot give consent.
The most important thing when deciding whether to do something sexual together is knowing that both people will feel good about what happened. If someone is unsure whether the other person is sober enough to consent, it is better to wait until another time when they are sure. If the other person is too drunk it is the person who is less drunks’ responsibility to not do anything sexual with them, look after them instead and make sure they are safe.