Hello, I need help making a option where in my announcement system it says the announcement globally. Globally as in all running game servers.
Anyways, any help would be great. I’ve done all the work to make the announcement now I just have to do is make it play in all servers.
Code
Activation Script, its a local script.
script.Parent.MouseButton1Click:Connect(function()
local textbox = script.Parent.Parent.Announce.Text
game.ReplicatedStorage.GlobalNotify:FireServer(textbox)
end)
Handler
--//Services
local ReplicatedStorage = game:GetService("ReplicatedStorage")
--//Variables
local RemoteEvent = ReplicatedStorage.GlobalNotify
--//Functions
RemoteEvent.OnServerEvent:Connect(function(player, text)
RemoteEvent:FireAllClients(text, player.Name)
end)
main bit, local script
--//Services
local ReplicatedStorage = game:GetService("ReplicatedStorage")
--//Variables
local RemoteEvent = ReplicatedStorage.GlobalNotify
--//Functions
RemoteEvent.OnServerEvent:Connect(function(player, text)
RemoteEvent:FireAllClients(text, player.Name)
end)
Event Handler thing
Event Handler
--Services
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local TweenService = game:GetService("TweenService")
--Variables
local RemoteEvent = ReplicatedStorage.GlobalNotify
local TextLabel = script.Parent
local frame = script.Parent.Parent.Parent
local line = script.Parent.Parent.Parent.Frame
local title = script.Parent.Parent.Parent.top.TextLabel
--Functions
RemoteEvent.OnClientEvent:Connect(function(text, player)
TextLabel.Text = text
title.Text = "Global Notification from "..player.."."
local TextTransparency = TweenService:Create(TextLabel, TweenInfo.new(1, Enum.EasingStyle.Quint), {TextTransparency = 0})
TextTransparency:Play()
local TextTransparency2 = TweenService:Create(title, TweenInfo.new(1, Enum.EasingStyle.Quint), {TextTransparency = 0})
TextTransparency2:Play()
local BackgroundTransparency = TweenService:Create(frame, TweenInfo.new(1, Enum.EasingStyle.Quint), {BackgroundTransparency = 0})
BackgroundTransparency:Play()
local TextTransparency2 = TweenService:Create(title, TweenInfo.new(1, Enum.EasingStyle.Quint), {TextTransparency = 0})
TextTransparency2:Play()
local BackgroundTransparency = TweenService:Create(line, TweenInfo.new(1, Enum.EasingStyle.Quint), {BackgroundTransparency = 0})
BackgroundTransparency:Play()
task.wait(5)
local TextTransparency = TweenService:Create(TextLabel, TweenInfo.new(1, Enum.EasingStyle.Quint), {TextTransparency = 1})
TextTransparency:Play()
local TextTransparency2 = TweenService:Create(title, TweenInfo.new(1, Enum.EasingStyle.Quint), {TextTransparency = 1})
TextTransparency2:Play()
local BackgroundTransparency = TweenService:Create(frame, TweenInfo.new(1, Enum.EasingStyle.Quint), {BackgroundTransparency = 1})
BackgroundTransparency:Play()
local BackgroundTransparency = TweenService:Create(line, TweenInfo.new(1, Enum.EasingStyle.Quint), {BackgroundTransparency = 1})
BackgroundTransparency:Play()
end)
Anyways, I made this post because I don’t know how to make an announcement appear in all the servers of a game at the same time. So please help me in any way you can