Completly reset script roblox studio

as the title says, i want to know how to completely reset to the beginning of a script

Uhhhh. If you want to reset a script don’t you delete all the code inside of it which means your script is empty?

What exactly do you mean here?

Speaking as this is the script helping section. In the script make the script reset.

I am asking about what you mean by “resetting” the script.

What do you mean by “in the script make the script reset”

Do you mean you want the code to loop?

Literally make the script run from the start.

I’d disable it then re-enable it. I’m not sure if it works though.

EDIT: ill test it
EDIT 2: ignore this i see what you mean now lol
EDIT 3: this only works if you use another script to disable it then re-enable it (not tested)

1 Like

ok, ill see what i can do with that information

I know this topic has been solved already however, a good way to “restart” a script from the start is to:

Move all of the script’s code inside a function which can be called as many times as you would want to run the code from inside the script.

If you would like to run the script from another script, you could create a bindable event inside the main script that could be called by the other script. When the event is called it would trigger the code inside of the script.

I personally feel that disabling and re-enabling a script is a really convoluted way to go about it and it may not work every time.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.