-- local script
local repStorage = game:GetService("ReplicatedStorage")
local Broadcast = repStorage:WaitForChild("Broadcast")
script.Parent.MouseButton1Click:Connect(function(player)
local MessageBox = script.Parent.Parent.MessageBox
local CharacterValue = script.Parent.Parent.CharacterLabel.Characters.Value
local CharactersLeftValue = script.Parent.Parent.CharacterLabel.CharactersLeft.Value
local MaxCharactersValue = script.Parent.Parent.CharacterLabel.MaxCharacters.Value
Broadcast:FireServer(player, MessageBox, CharactersLeftValue, CharacterValue, MaxCharactersValue)
end)
and
game.ReplicatedStorage.Broadcast.OnServerEvent:Connect(function(player, MessageBox, CharactersLeftValue, CharacterValue, MaxCharactersValue)
for i,v in pairs(game.Players:GetPlayers()) do
local InstanceGui = v.PlayerGui.InstanceGui
local MessageFrame = Instance.new("Frame", InstanceGui)
MessageFrame.Name = "MessageFrame"..math.random(1,1000)
MessageFrame.Size = UDim2.new(0.2, 0,0.2, 0)
MessageFrame.Position = UDim2.new(0.029, 0,0.703, 0)
MessageFrame.BackgroundColor3 = Color3.fromRGB(102,102,102)
MessageFrame.BorderSizePixel = 3
MessageFrame.BackgroundTransparency = 0
local AspectRatio = Instance.new("UIAspectRatioConstraint", MessageFrame)
AspectRatio.AspectRatio = 1.5
local Title = Instance.new("TextLabel", MessageFrame)
Title.Name = "Title"
Title.Size = UDim2.new(1, 0,0.2, 0)
Title.Position = UDim2.new(0, 0,0, 0)
Title.BorderSizePixel = 3
Title.Font = Enum.Font.GothamBold
Title.Text = "Server Broadcast"
Title.TextColor3 = Color3.fromRGB(255,255,255)
Title.BackgroundColor3 = Color3.fromRGB(102,102,102)
Title.TextScaled = true
local Text = Instance.new("TextLabel", MessageFrame)
Text.Name = "Text"
Text.Size = UDim2.new(1, 0,0.798, 0)
Text.Position = UDim2.new(0, 0,0.2, 0)
Text.BorderSizePixel = 0
Text.Font = Enum.Font.GothamBold
Text.Text = tostring(MessageBox.Text) -- Mainly this part
Text.TextColor3 = Color3.fromRGB(255,255,255)
Text.BackgroundColor3 = Color3.fromRGB(102,102,102)
Text.TextScaled = true
Text.BackgroundTransparency = 1
MessageBox.Text = "" -- this a bit
CharactersLeftValue = MaxCharactersValue
CharactersLeftValue = 0
MessageBox.TextEditable = true -- And this
wait(5)
MessageFrame:Remove()
end
end)
Pretty much here, trying to make a server broadcast thing

1 comment
i was just messing around with it to try to make it work