Education in Indonesia has a big goal of forming children's character as pillars of the nation's ideology. Teachers, as the spearhead of educational institutions, have a big responsibility in pioneering student development. However, the reality shows that there are cases of serious violations, such as sexual violence, which have been revealed in several incidents at school. This study uses library research methods to explore information related to the role of teachers, codes of ethics, and cases of sexual violence in schools. Criminal responsibility for perpetrators of sexual violence, especially educational staff, is a major focus. The Child Protection Law and the Criminal Code regulate criminal sanctions, and factors such as breach of official duties and use of the national flag can increase penalties. In addition, social rehabilitation needs to be implemented, including the installation of electronic detection devices and psychiatric rehabilitation, to ensure child protection and correct the behavior of perpetrators. The importance of enforcing the teacher code of ethics is an important focus in ensuring integrity and professionalism in the world of education. Cases of ethical violations by teachers involved in sexual abuse demonstrate the need for improvements in training, awareness, and supervision of teacher behavior. In dealing with the problem of sexual violence at school, the role of parents, family and society is no less important. All parties must work together to create an environment that is safe, supportive and caring for children's rights. Strict law enforcement against perpetrators of sexual violence, especially teachers, sends the message that such acts will not be tolerated in society. By combining legal, ethical and social role aspects, this research highlights the need for a holistic approach in creating a truly safe educational environment and supporting the development of positive character of the younger generation in Indonesia.