local TextButton = script.Parent wait(15.5) TextButton.Visible = true if TextButton.Visible then script:Destroy() print("script destroyed") end
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..
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