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

I have a script that makes GUI's visible but its not destroying the script. Can someone help me?

Asked by 5 years ago
1local TextButton = script.Parent
2wait(15.5)
3TextButton.Visible = true
4if TextButton.Visible then
5script:Destroy()
6print("script destroyed")
7end
0
is it a local script or a server script deth836231 142 — 5y

2 answers

Log in to vote
0
Answered by 5 years ago

destroying scripts in roblox is not consistant, it typically results in a warning that says Something tried to parent script to nil .. I don't think there's a workaround to this, the best thing u can do is set variables in the script to release the memory that they occupy..

0
I never got an error like that..hmm odd. Nistrict 44 — 5y
0
like i said, its very incosistant.. User#23252 26 — 5y
Ad
Log in to vote
0
Answered by 5 years ago

first of all idk what your looking in but to see if the script has destroyed or not go to Players--> 'Your Player Name' --> PlayerGui --> and go on to your gui from there

1local TextButton = script.Parent
2    wait(15.5)
3    TextButton.Visible = true
4    if TextButton.Visible then
5            print("script destroyed")
6        script:Destroy()
7        end

your script is working but i edited it so it prints "script destroyed" because if its destroyed the script doesnt run anymore

0
the script doesnt destroy Nistrict 44 — 5y

Answer this question