local msg = script.Parent.Parent.StarterGui.Ticker.Ticker.TextLabel while true do wait(6) msg.Text = "Disaster: Flood" wait(9) msg.Text = "You have 60 seconds to build" wait(9) wait(60) function Flood() game.Workspace.Flood.Size = Vector3.new(518, 22, 521) game.Workspace.Flood.CFrame = CFrame.new(Vector3.new(-1,10,-2.5)) end Flood() wait(20) function AntiFlood() game.Workspace.Flood.Size = Vector3.new(10, 5, 10) game.Workspace.Flood.CFrame = CFrame.new(Vector3.new(-1,-42,-2.5)) msg.Text = "You lived!" end AntiFlood() end return
It is supposed to display a message on a gui but it isn't working and it also isn't showing any output. Anyone has any idea what I did wrong here?
Changing something inside the StarterGui will not change it for all of the players. Instead, you can create a function to display a message for all of the players:
function Display(msg) for _,v in pairs(game.Players:GetPlayers())do local x=v.PlayerGui:FindFirstChild("Ticker") if x then x=x:FindFirstChild("Ticker") if x then x=x:FindFirstChild("TextLabel") if x then x.Text=msg end end end end end function Flood() game.Workspace.Flood.Size = Vector3.new(518, 22, 521) game.Workspace.Flood.CFrame = CFrame.new(Vector3.new(-1,10,-2.5)) end function AntiFlood() game.Workspace.Flood.Size = Vector3.new(10, 5, 10) game.Workspace.Flood.CFrame = CFrame.new(Vector3.new(-1,-42,-2.5)) Display("You lived!") end while true do wait(6) Display("Disaster: Flood") wait(9) Display("You have 60 seconds to build") wait(9) wait(60) Flood() wait(20) AntiFlood() end