generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: why doesn't this filter text

Previous Thread :: Next Thread 
Iegoadz is not online. Iegoadz
Joined: 13 Sep 2015
Total Posts: 4189
24 Sep 2017 09:09 AM
this is the server script which is called by the client, it only returns the same text, not filtered.


local Chat = game:GetService("Chat")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

game.ReplicatedStorage.filter_text.OnServerInvoke = function(player, text)

local success, message = pcall(function()
filteredText = game.Chat:FilterStringForBroadcast(text, player)
end)
if not success then
text = ""
end
print(filteredText)
return filteredText
end


Report Abuse
Iegoadz is not online. Iegoadz
Joined: 13 Sep 2015
Total Posts: 4189
24 Sep 2017 09:56 AM
b


Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
24 Sep 2017 09:59 AM
Are you testing this online?


Report Abuse
Iegoadz is not online. Iegoadz
Joined: 13 Sep 2015
Total Posts: 4189
24 Sep 2017 10:04 AM
i am testing this on my game.

it just returns the same text as was input.

text is just a normal string that a player inputs into a gui.

I enter swearing on play mode on studio and it just returns the same thing


Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
24 Sep 2017 10:23 AM
IIRC, it only works online. I'm probably wrong, but you should consider testing online.
Also, you should ditch the pcall because if there's an error there, you want to know. Pcall is only for things that have a random chance of erroring with errors that can't be fixed and can be ignored.


Report Abuse
200Ethan is online. 200Ethan
Joined: 01 Apr 2013
Total Posts: 302
24 Sep 2017 10:27 AM
It doesn't look like message is being called... But if it wasn't being called, then filteredText would be unknown, right? This is weird, because everything looks like it should work... I'm not the best at scripting, so I have a question: is message being called instantly after being defined or something?
Report Abuse
Iegoadz is not online. Iegoadz
Joined: 13 Sep 2015
Total Posts: 4189
24 Sep 2017 01:25 PM
here is where the text is used in the client gui:

-- filter text that was sent
new_text = game.ReplicatedStorage.filter_text:InvokeServer(script.Parent.Parent.Input.Text)
print(new_text)



it just prints the unfiltered text


Report Abuse
Iegoadz is not online. Iegoadz
Joined: 13 Sep 2015
Total Posts: 4189
24 Sep 2017 01:26 PM
@200
nice primary lol


Report Abuse
Iegoadz is not online. Iegoadz
Joined: 13 Sep 2015
Total Posts: 4189
24 Sep 2017 02:03 PM
b


Report Abuse
Iegoadz is not online. Iegoadz
Joined: 13 Sep 2015
Total Posts: 4189
24 Sep 2017 02:10 PM
bump


Report Abuse
Iegoadz is not online. Iegoadz
Joined: 13 Sep 2015
Total Posts: 4189
24 Sep 2017 02:39 PM
bump


Report Abuse
Iegoadz is not online. Iegoadz
Joined: 13 Sep 2015
Total Posts: 4189
24 Sep 2017 02:55 PM
help


Report Abuse
Iegoadz is not online. Iegoadz
Joined: 13 Sep 2015
Total Posts: 4189
24 Sep 2017 03:11 PM
pls


Report Abuse
UltraTechX is not online. UltraTechX
Joined: 24 Oct 2013
Total Posts: 350
24 Sep 2017 03:14 PM
stop bumping this, after 3 bumps just stop and wait for a response.
Report Abuse
Iegoadz is not online. Iegoadz
Joined: 13 Sep 2015
Total Posts: 4189
24 Sep 2017 04:39 PM
no response yet


Report Abuse
Iegoadz is not online. Iegoadz
Joined: 13 Sep 2015
Total Posts: 4189
24 Sep 2017 04:55 PM
ok yea does just turn out that it doesnt work in play mode, but in normal online mode it does

ty


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image