local function filterMessage(msg, fromUser)
local result
local success, err = pcall(function()
result = TextService:FilterStringAsync(msg, fromUser)
end)
if success then
return result
end
return false
end
local gui = owner.PlayerGui.ClanGui.CreateClanFrame
local filter = filterMessage(clanName, owner)
if filter == false then
print("text was filtered")
gui.create.Text = "Error: Innapropriate clan name."
else
print("text was not filtered")
owner.ownsClan.Value = true
owner.Clan.Value = clanName
addClanInstance(clanName, owner)
local dataToSave = {owner.UserId, clanName}
CLANS:SetAsync(owner.UserId, dataToSave)
print("saved "..owner.UserId, clanName)
gui.create.Text = "Clan "..clanName.." created!"
wait(2)
gui.Visible = false
end
end)
That code does not work, it will filter everything.
I have already tried tutorials on the devforum and they don’t seem to work for me, and they still filter everything.
Scripting support is not for full blown scripts, but more as fixing a script that isn’t working already. If you made a new post with your old code that wasn’t working then we can help!
As @acuaro said, don’t be posting your full scripts. I am not interested in looking into your whole script to find your error, try printing and seeing which specific part isn’t working.