Okay, so apparently this works in studio when I solo test it, but not on an actual server. Can anyone see the error? I'm trying to make a functioning radio.
script.Parent.Main.EnterText.FocusLost:connect(function ()
if script.Parent.Main.EnterText.Text == "[ Enter Text ]" then return end
if script.Parent.Main.EnterText.Text == "" then return end
plyrs = game.Players:GetPlayers()
for i = 1, #plyrs do
if not plyrs[i].PlayerGui:FindFirstChild("Comms") then
if not plyrs[i].Backpack:FindFirstChild("Virgo Comm") then return end
L = plyrs[i].Backpack:FindFirstChild("Virgo Comm")
L.Main.Messages.MSG5.Text = L.Main.Messages.MSG4.Text
wait()
L.Main.Messages.MSG4.Text = L.Main.Messages.MSG3.Text
wait()
L.Main.Messages.MSG3.Text = L.Main.Messages.MSG2.Text
wait()
L.Main.Messages.MSG2.Text = L.Main.Messages.MSG1.Text
wait()
L.Main.Messages.MSG1.Text = ""
wait()
L.Main.Messages.MSG1.Text = script.Parent.Parent.Parent.Name.."// "..game.Players:FindFirstChild(script.Parent.Parent.Parent.Name).PlayerGui.Comms.Main.EnterText.Text
wait()
L.Comms.Alert:Clone().Parent = L.Parent.Parent.Character.Head()
L.Parent.Parent.Character.Head.Alert.PlayOnRemove = true
L.Parent.Parent.Character.Head.Alert:remove()
end
C = plyrs[i].PlayerGui:FindFirstChild("Comms")
C.Main.Messages.MSG5.Text = C.Main.Messages.MSG4.Text
wait()
C.Main.Messages.MSG4.Text = C.Main.Messages.MSG3.Text
wait()
C.Main.Messages.MSG3.Text = C.Main.Messages.MSG2.Text
wait()
C.Main.Messages.MSG2.Text = C.Main.Messages.MSG1.Text
wait()
C.Main.Messages.MSG1.Text = ""
wait()
C.Main.Messages.MSG1.Text = script.Parent.Parent.Parent.Name.."// "..game.Players:FindFirstChild(script.Parent.Parent.Parent.Name).PlayerGui.Comms.Main.EnterText.Text
wait()
C.Alert:Play()
end
script.Parent.Main.EnterText.Text = "[ Enter Text ]"
end)

1 comment
Thank you SO MUCH!