How to restart only one script in gdscript

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By FlamingSpear

I only want to restart a script not the whole game (i know how to do that), when a function is called
Pls answer

  • What do you mean by restart?
  • What’s in the script (maybe post it?)
  • How is the script loaded (attached to a node, autoload, …)?
  • What’s the underlying problem you’re trying to solve?

jgodfrey | 2020-12-05 15:44

Bumping because I have the same question

I want a script to restart itself once it is complete under an if condition

Copy-pasting, because the forum needs the same information:

  • What do you mean by restart?
  • What’s in the script (maybe post it?)
  • How is the script loaded (attached to a node, autoload, …)?
  • What’s the underlying problem you’re trying to solve?