How do i make a script which takes all the children of a gameobject and does a function (deleting them, for example)? i use Java
bump
No you dont. You use JavaScript (AKA UnityScript). There is a a difference. Learn it.
You can easily make a for loop which uses:
https://docs.unity3d.com/ScriptReference/Transform-childCount.html and
https://docs.unity3d.com/ScriptReference/Transform.GetChild.html