I have 2 player guis. In one of them I have guis.... and in the other I have..a script that we dont need to know about, a frame, and a textbutton. In the textbutton I have a script that is below! vv NOT A REQUEST! I want to know what I am doing wrong!!
-- We need this script to destroy all player guis!!!!
-- Local Script inside the button
local clicked = false
script.Parent.MouseButton1Down:connect(function()
if clicked == false then
clicked = true
local timer = 10 -- timer is 10 seconds
local p = game.Players.LocalPlayer
while timer > 0 do -- while the timer is bigger than 0 subtract 1, every second
wait(1)
timer = timer - 1
p.PlayerGui.TeleportGui.TeleportGui.Close.Text = "READ DESC. ("..timer..")" -- changing the text of the button to the cooldown, and indicates the seconds remaining till the gui is removed
end
p.PlayerGui.TeleportGui:Destroy()
end
end)

1 comment
Im not so sure.