local TextButton = script.Parent
wait(15.5)
TextButton.Visible = true
if TextButton.Visible then
script:Destroy()
print("script destroyed")
end
I have a script that makes GUI's visible but its not destroying the script. Can someone help me?
2 answers
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..
2 comments
I never got an error like that..hmm odd.
like i said, its very incosistant..
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
local TextButton = script.Parent
wait(15.5)
TextButton.Visible = true
if TextButton.Visible then
print("script destroyed")
script:Destroy()
end
your script is working but i edited it so it prints "script destroyed" because if its destroyed the script doesnt run anymore
1 comment
the script doesnt destroy
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
is it a local script or a server script