Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

?GUI pop up for all players with a countdown message

Asked by 9 years ago

Hi, I need it to have a ten second countdown, after that a three second message and then a remove.

seconds = 10

function update() for i, v in pairs(game.Players:GetPlayers()) do a=v.PlayerGui:FindFirstChild("CuntGui") if a then a:destroy() end GUI = Instance.new("ScreenGui", v.PlayerGui) GUI.Name = "CuntGui" GUI2= Instance.new("TextLabel", GUI) GUI2.Size = UDim2.new(1,0,1,0) GUI2.Position = UDim2.new(0,0,0,0) GUI2.Text = seconds end end

while seconds > 0 do seconds = seconds - 1 wait(1) update() end GUI2.Text = "Over" wait(3) GUI:destroy()

problem: I need the text for all players to be the same countdown and the same message at the "same time".

1 answer

Log in to vote
0
Answered by 9 years ago

Well, first off, I do this: game>workspace>value (that was how it is ordered) the value is the object the gui's change to. So, basically: (in the players PlayerGui, in a textlabel in screengui)

val = workspace.Timer --value
val.Changed:connect(function(val)
if val >= 4 and val <= 10 then
script.Parent.Visible = true
script.Parent.Text = val
elseif val ==3 then
m = Instance.new("Message")
m.Parent = Workspace
m.Text = ""--put text in quotes"
elseif val == 0 then 
m:Destroy
script.Parent.Visible = false

if you want a script for the value changer just ask. I use these kind of things and they work. Usually.

0
Hi, sorry I didn't say before but I already solved it. Thanks anyways! XxKillerHumanxX 0 — 9y
Ad

Answer this question