I'm trying to find a script for unity 2d. I need one that restarts the scene I've currently loaded. I've tried a couple from the internet, but none of them seem to work. I just need the basic script, not any way to trigger it because I can do that myself. Thanks in advance!
I would recommend you to go through the SceneManager class in Unity Docs.
However, you can use this line to reload the current scene thus, restarting it:
SceneManager.LoadScene(SceneManager.GetActiveScene());
Hope that answers your questions.