GUI Change and Visbility

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)
1 Like

The only line of code I can see that might block the text from showing up is
if activated.Value == true then , so take a look at that activated instance and make sure it’s true when you need it.
Also, use prints to debug your code and see where it stops. I recommend adding one on the ClientEvent to check if the event actually reaches the client

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.