Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I delete script permanently using script?

So, I am trying to make a tutorial for my game, but I don't know how I would make the script play once only or gets perm deleted. Is there anyway I can do that?

7 comments

0

script.Disabled or script:Destroy()

0

Within the script itself? You can destroy it with script:Destroy() or simply disable it with script.Disabled = true

0

Ah, Vulkarin beat me to it :P

0

But then when he rejoins wouldnt it reset?

0

No, only when the server restarts(or open)

0

Well, granted that it's a localscript you're referring to, yeah, it would re-replicate every time you join. If you want a tutorial to fire off once per client, regardless of whether they rejoin, you're going to want to use a datastore that tracks completion.

0

Oh rip

2 answers

✓ Accepted answer

I looked over the comments and noticed that you want it to save after the player leaves.

You should probably set up a Boolean Value in the player called "TutorialCompleted" which saves. Once a player joins it should check over the value and see what it's set to.

(If false, play tutorial, if true, skip tutorial)

script.Remove(script) -- only comes back when the player rejoins the game

This discussion is preserved as it was. New answers, comments, and votes are closed.