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

How to make a script COMPLETELY STOP?

Asked by 5 years ago

Hey again, this is my 3rd question I've asked today lol, sorry about that!

My question is how to make a script completely stop, like not run again once i die. I have a loading screen thing going on and i really like it, but i dont want players to see the whole thing again once they die, so far i've tried:

1script.parent.GamePopup:Destroy()

This hasnt worked, so then i tried:

1script.Disabled = true

And that also didnt work, if you're wondering here is my script (there are no loops in it)

01script.Parent.GamePopup.Background.Visible = true
02script.Parent.GamePopup.Visible = true
03script.Parent.GamePopup.Teleporting.Visible = true
04script.Parent.GamePopup.Wait.Visible = true
05script.Parent.GamePopup.Lib.Visible = true
06 
07local Tween = game:GetService("TweenService")
08-- Content Variables
09 
10local Sidebar = script.Parent:WaitForChild("Sidebar")
11local Title = Sidebar:WaitForChild("Logo")
12 
13local MenuOver = script.Parent:FindFirstChild("MenuOver")
14MenuOver.Value = false
15print(MenuOver.Value)
View all 88 lines...

Anyway to make the script stop completely forever?

0
Try script:Destroy() as it will destroy itself after it has done it's work... SilentsReplacement 468 — 5y
0
nahh do break or return IcyMizu 122 — 5y
0
Script:Destroy() can be the most convenient in my opinion as it just destroys the whole script.. SilentsReplacement 468 — 5y
0
break or return are not to use as they can still be ran and used. moo1210 587 — 5y
0
bruh just use script.Disabled = true TheRealPotatoChips 793 — 5y

2 answers

Log in to vote
0
Answered by
zeptak 4
5 years ago

Hi, i assume that it's something like menu.. you can set the gui to not reset when character dies..

1ScreenGui.ResetOnSpawn = false

You can change it without script in properties. Hope that helps.

Ad
Log in to vote
0
Answered by 5 years ago

You can use

1script.Destroy()

or

1script.Disabled = true

Answer this question