You can write your topic however you want, but you need to answer these questions:
- What do you want to achieve? Keep it simple and clear!
I want so when players send bad words to radio it gets #
- What is the issue? Include screenshots / videos if possible!
I don’t know how to make text filtering
- What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Looking around forum.
Local script:
local uis = game:GetService("UserInputService")
local activeDisabled = script.Parent.ActiveDisable.activeDisable
local buttonForStatus = script.Parent.ActiveDisable
local remots = game:GetService("ReplicatedStorage").remotes
script.Parent.Visible = true
uis.InputBegan:Connect(function(input, gameProccessedEvent)
if not gameProccessedEvent then
if input.KeyCode == Enum.KeyCode.T then
if activeDisabled.Value == false then
buttonForStatus.BackgroundColor = BrickColor.new("Dark green")
buttonForStatus.Text = "On [T]"
activeDisabled.Value = true
else
buttonForStatus.BackgroundColor = BrickColor.new("Really red")
buttonForStatus.Text = "Off [T]"
activeDisabled.Value = false
end
end
end
end)
game.Players.LocalPlayer.Chatted:Connect(function(chat)
if activeDisabled.Value == false then
else
remots.chatSentToRadio:FireServer(chat)
end
end)
buttonForStatus.MouseButton1Click:Connect(function()
if activeDisabled.Value == false then
buttonForStatus.BackgroundColor = BrickColor.new("Dark green")
buttonForStatus.Text = "On [T]"
activeDisabled.Value = true
else
buttonForStatus.BackgroundColor = BrickColor.new("Really red")
buttonForStatus.Text = "Off [T]"
activeDisabled.Value = false
end
end)
Server script:
local remots = game:GetService("ReplicatedStorage").remotes
remots.chatSentToRadio.OnServerEvent:Connect(function(plr, chat)
for i,v in pairs(game.Players:GetPlayers()) do
local msgTemplet = v.PlayerGui.radio.msgTextTemplet:Clone()
msgTemplet.Text = plr.Name .. ": " .. chat
msgTemplet.Visible = true
msgTemplet.Parent = v.PlayerGui.radio.Background.ScrollingFrame
local msgTemplet2 = msgTemplet:Clone()
msgTemplet2.Parent = game.StarterGui.radio.Background.ScrollingFrame
end
end)