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 4 years ago
local TextButton = script.Parent
wait(15.5)
TextButton.Visible = true
if TextButton.Visible then
script:Destroy()
print("script destroyed")
end
0
is it a local script or a server script deth836231 142 — 4y

2 answers

Log in to vote
0
Answered by 4 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 — 4y
0
like i said, its very incosistant.. User#23252 26 — 4y
Ad
Log in to vote
0
Answered by 4 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

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

0
the script doesnt destroy Nistrict 44 — 4y

Answer this question