I'm trying to make it so after around 5 - 10 seconds, a script removes a textlabel that is inside my main gui. But for some reason, my script doesn't remove it.
Below is the script currently in the "remove" script. Not sure if localscript is better for this. Not sure if my script is the way to go eather.
wait(15) script.Parent:remove() print("NameGui removed.")
Below is the image of what i want removed. The textlabel named "Text"
make it a localscript inside of the TextLabel.
wait(10) script.Parent:Destroy()
Make sure this is in a LOCAL SCRIPT
--Setup Variables local WaitTime = 15 -- Change to the amount of seconds you want local IsButton = false --If you want a button to destroy it, change to true if IsButton == true then local Button = script.Parent.Parent.Button --Change to the button's path else local Button = nil end local ObjRemove = script.Parent --Change to the Label's path --Code if IsButton == true then --There is a button Button.MouseButton1Click:Connect(function(Player) --On Clicked ObjRemove:Destroy() else --If you just want it to wait wait(WaitTime) --Wait ObjRemove:Destroy() --Destroy end
Non of the solutions over worked. I've tried them all as eather Script or LocalScript.