I don't know why it isn't working. The Text Button gets cloned into the GUI, but the actual text inside the button wont update with the time.
local time = 120 game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) script.ScreenGui:Clone().Parent = player.PlayerGui script.ScreenGui.TextButton.Text = tostring(time) end) end) for i = 1, 120 do wait(1) time = time - 1 end
I figured out how to fix it.
local time = 100 game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) for i = 1, 100 do script.ScreenGui:Clone().Parent = player.PlayerGui wait(1) script.ScreenGui.TextButton.Text = tostring(time) time = time - 1 end end) end)
Feel free to use it.