|
| 28 Jul 2014 02:56 PM |
I have a countdown Gui in side of this script here
function added(player) GUI = script.CountDown:clone() GUI.Parent = player:WaitForChild("PlayerGui") repeat wait() until player.Character end
game.Players.PlayerAdded:connect(added)
then the script for the acual gui count down whos parent is a frame and that parent is a Screen Gui then the script and a text label are children of the frame
local text = "Game starting in: " local msg = script.Parent.Countdown local delay = 0.1 local cur_time = 5 local max_time = 6 function newGame() for i=1, #text do msg.Text = msg.Text .. string.sub(text, i, i) wait(delay) end while(cur_time > -1)do msg.Text = text .. cur_time cur_time = cur_time - 1 wait(1) if cur_time == 0 then msg.Text = text.."0" wait(1) msg.Parent.Parent:Destroy() end end end
newGame()
it works fine exept for the fact that the is to G's so it says
GGame Starting in but once it finishes it says Game Starting in : NUMBER HERE |
|
|
| Report Abuse |
|
| |