Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Any way to reload a script as if the game was just starting?

Asked by
zomspi 541 Moderation Voter
4 years ago

Is there any way to reload a script, as in making it run again as if the game was starting?

1 answer

Log in to vote
0
Answered by 4 years ago

You should make it a function. That way you can call it again, again and again.

function startGame()
    --Enter the game code here
end
--Under here is how to call it.
startGame()

When you want to start the game, call the function, and all code inside will run. - Toby

0
Is there any way to call it from another script? zomspi 541 — 4y
0
Use either a remote event or a remote function. tobiO0310 58 — 4y
Ad

Answer this question