Is possible to remove a script by script.

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

I have a _physics_process running, but I want to stop it after it is done.
Was thinking that I could remove the script, or however way there is.

elif !run_once and time_starting.is_stopped() :
	print("locked")
	run_once = true
	(delete script)
:bust_in_silhouette: Reply From: Dlean Jeans

Try:

set_script(null)

It works, thanks.

usurun | 2019-07-08 05:26