I am having an issue with a radio script, once someone messages, the radio GUI change is only visible to one player. If someone sends a transmission, and someone else sends one, both transmissions will only be seen from one person. What is happening?
Local Script
local chatEvent = game.ReplicatedStorage.ChatEvent
local TextService = game:GetService("TextService")
local activated = script.Parent.Activated
local text = script.Parent.MainRadio.GlobalFrame.TextLabel
local activation = script.Parent.MainRadio.Activation
local micOn = script.Parent.OpenMic
local micOff = script.Parent.CloseMic
local callsign = script.Parent.Callsign
local mainradio = script.Parent.MainRadio
chatEvent.OnClientEvent:Connect(function(msg)
if activated.Value == true then
local transmission = text:Clone()
transmission.Parent = script.Parent.MainRadio.GlobalFrame
transmission.Text = callsign.Value..":".. msg
end
end)
activation.MouseButton1Click:Connect(function()
if activated.Value == true then
activation.BackgroundColor3 = Color3.new(255, 0, 0)
activation.Text = "DISABLED"
activated.Value = false
micOff:Play()
else
activation.BackgroundColor3 = Color3.new(0.215686, 1, 0)
activation.Text = "ACTIVATED"
activated.Value = true
micOn:Play()
end
end)
Server Script
local chatEvent = game.ReplicatedStorage.ChatEvent
local players = game:GetService("Players")
players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(msg)
chatEvent:FireAllClients(msg)
end)
end)