SeraineJoin Date: 2012-06-17 Post Count: 2770 |
When a user enter some #### ## a Textbox and click on 'Submit' button, the same text appears on a SurfaceGui called "Surface GUI2", but when I enter inappropriate words, they don't get hashtagged and people can see the inappropriate words appearing on the SurfaceGui This is server-sided script inside 'Submit' button, the game is not Filtering Enabled by the way - function onButtonClicked() game.Workspace["Surface GUI2"].SurfaceGui.Frame.Frame.TextLabel.Text = script.Parent.Parent.TextBox.Text end script.Parent.MouseButton1Click:connect(onButtonClicked) Will be giving a donation to whoever can fix this... I've got a dream that's worth more than my sleep♥ |
|
SeraineJoin Date: 2012-06-17 Post Count: 2770 |
When a user enter texts in a Textbox and click on 'Submit' button, the same text appears on a SurfaceGui called "Surface GUI2", but when I enter inappropriate words, they don't get hashtagged and people can see the inappropriate words appearing on the SurfaceGui
This is server-sided script inside 'Submit' button, the game is not Filtering Enabled by the way -
function onButtonClicked()
game.Workspace["Surface GUI2"].SurfaceGui.Frame.Frame.TextLabel.Text = script.Parent.Parent.TextBox.Text
end
script.Parent.MouseButton1Click:connect(onButtonClicked)
Will be giving a donation to whoever can fix this...
I've got a dream that's worth more than my sleep♥ |
|
|
Text is not automatically filtered, you need to call a function to do that. as explained here in this wiki link.
local filteredMessage if game:GetService("RunService"):IsStudio() then -- FilterStringAsync does not work in Studio
chatMessage:FireClient(player, sender, message)
else
local success, filteredMessage = pcall(function() return ChatService:FilterStringAsync(message, sender, player)
end)
if not success then
filteredMessage = "Failed to filter message" end
chatMessage:FireClient(player, sender, filteredMessage)
end |
|
|
surfacegui.Text = game:GetService('Chat'):FilterStringForBroadcast(textbox.Text,playerWhoInputted)
capitalist atheist |
|
|
################################################################## replace the (DOT) with a . |
|
|
I hate this filter, the irony, getting filtered while trying to link to wiki about filter. |
|
CyrakohlJoin Date: 2014-11-09 Post Count: 3197 |
for _,v in pairs(game.Players:GetChildren()) do
surfaceGui.Text = game:GetService("Chat"):FilterStringForBroadCast(surfaceGui.Text,v)
end
(It filters it for the entire server)
#code print(string.rep("Lit",5))
#code print(string.rep("Lit",5)) |
|
CyrakohlJoin Date: 2014-11-09 Post Count: 3197 |
Dont worry about that im dumb lol.
#code print(string.rep("Lit",5)) |
|
SeraineJoin Date: 2012-06-17 Post Count: 2770 |
I used an example script from FilterStringForBroadcast example under Text Filtering section, but when I tested in GUI in server mode, it says "FireServer can only be called from client"?
I've got a dream that's worth more than my sleep♥ |
|
SeraineJoin Date: 2012-06-17 Post Count: 2770 |
I used this script, it's inside the submit text button -
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local frame = script.Parent.Parent
local box = frame.TextBox
local button = frame.TextButton
local setSignText = ReplicatedStorage:WaitForChild("SetSignText")
local function onClick()
local message = box.Text
if message ~= "" then
setSignText:FireServer(message)
frame.Visible = false
end
end
button.MouseButton1Click:Connect(onClick)
Why does it says "FireServer can only be called from the client" when I click on the button...?
I've got a dream that's worth more than my sleep♥ |
|