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!
a literal filter for my textlabel -
What is the issue? Include screenshots / videos if possible!
i got a textlabel and a serverscript with a local script and what they do is when you say “/tweet hi” its going to show a gui on everyones screen saying “hi” and showing who said that, the thing is i can say bad words and it won’t be filtered -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
i tried finding a tutorial on youtube and searched alot of devforum posts, but nothing worked
heres the local script inside starterplayerscripts:
local remoteEvent = game.ReplicatedStorage.RemoteEvent
local player = game.Players.LocalPlayer
local UI = player.PlayerGui.NotificationGui
local Players = game:GetService("Players")
remoteEvent.OnClientEvent:Connect(function(Message : string,Name : string)
UI.Enabled = true
UI.TextLabel.Text = Message
UI.PlayerName.Text = Name.." Tweeted:"
task.wait(5)
UI.Enabled = false
end)
and here’s the serverscript in serverscriptservice:
local remoteEvent = game.ReplicatedStorage.RemoteEvent
local players = game.Players
players.PlayerAdded:Connect(function(plr)
plr.Chatted:Connect(function(msg)
if msg:sub(1,7) ~= "/tweet " then return end
local Message = msg:sub(8,string.len(msg))
remoteEvent:FireAllClients(Message,plr.Name)
end)
end)