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

How do I remove a Script after its runned?

Asked by 8 years ago

I have a LocalScript inside my StarterGui that contains a intro. and I want the intro to run and then gets destroyed so it wont replay after you die

2 answers

Log in to vote
4
Answered by 8 years ago

Well, referring to your answer, not exactly. If you're planning on making an introduction GUI, I suggest using the ReplicatedFirst service.

Your method of removing it from the StarterGui service, will make it so that introduction doesn't load for anyone else that joins the game, which is definitely not what you want.

I made a video recently on how the ReplicatedFirst service works, and how it can be used: https://www.youtube.com/watch?v=WxzgO-60XPw

I also suggest you take a look at ROBLOX's documentation of the service, for any other questions you may have. Here are some links:

http://wiki.roblox.com/index.php?title=API:Class/ReplicatedFirst http://wiki.roblox.com/index.php?title=Custom_loading_screen

Ad
Log in to vote
0
Answered by 8 years ago

nvm I got it :D game.StarterGui.BlueLoadingbar:remove()

Answer this question