Hey everyone! Question for you all…
I’ve made a radio script for my game. The part where it gets enabled from the keybind and everything works, but once it gets to the cloning the textbox part, it doesn’t seem to anymore.
Server Script:
local txtsrvc = game:GetService("TextService")
local plr = script.Parent.Parent.Parent.Parent
if plr.TeamColor == BrickColor.new("Really red") or plr.TeamColor == BrickColor.new("Lime green") then
script.Parent.Visible = true
else
script.Parent.Visible = false
end
if plr.TeamColor == BrickColor.new("Really red") then
script.Parent.rank.BackgroundColor3 = Color3.fromRGB(150,0,0)
script.Parent.rank.Text = "ADMN"
end
wait(2)
local s = script.Parent.beep:Clone()
s.Parent = plr.Character
function enable()
if script.Parent.activated.Value == true then
script.Parent.activated.Value = false
script.Parent.enabled.BackgroundColor3 = Color3.fromRGB(150,0,0)
script.Parent.enabled.Text = "MICROPHONE DISABLED"
else
script.Parent.activated.Value = true
script.Parent.enabled.BackgroundColor3 = Color3.fromRGB(0,150,0)
script.Parent.enabled.Text = "MICROPHONE ENABLED"
s:Play()
end
end
function chatted(msg)
if script.Parent.activated.Value == true then
local filteredmsg = game:GetService("Chat"):FilterStringForBroadcast(msg, plr)
local clone = game.StarterGui.AdminMain.radio.ScrollingFrame.CloneMe:Clone()
clone.Text = filteredmsg
clone.Visible = true
end
end
plr.Chatted:Connect(chatted)
script.Parent.changedevent.OnServerEvent:Connect(enable)
Any help is appreciated. Thanks!