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: Text Filtering for my Change Name GUI (Need Help)

Previous Thread :: Next Thread 
Physalus is not online. Physalus
Joined: 18 Dec 2013
Total Posts: 77
02 Feb 2017 06:16 PM
Alright so Im interested in the Filtering Text, for an example I want to add it to a "Change Name GUI" so roblox wont ban my game. Im confused how I will start it? This is what I have in the script. I also need to know where to put it and everything, cause Im confused about the new Filtering Chat. Script;


script.Parent.FocusLost:connect(function(enter)
if enter then
v = game.Players.LocalPlayer
for a, mod in pairs(v.Character:children()) do
if mod:findFirstChild("NameTag") then
v.Character.Head.Transparency = 0 mod:Destroy()
end
end

local char = v.Character
local mod = Instance.new("Model", char)
mod.Name = script.Parent.Text
local cl = char.Head:Clone()
cl.Parent = mod

local hum = Instance.new("Humanoid", mod)
hum.Name = "NameTag"
hum.MaxHealth = 0
hum.Health = 0

local weld = Instance.new("Weld", cl) weld.Part0 = cl weld.Part1 = char.Head
char.Head.Transparency = 1
end
end)
Report Abuse
AggressiveCatch is not online. AggressiveCatch
Joined: 17 Jul 2011
Total Posts: 5840
02 Feb 2017 06:17 PM
local string = textbox.Text

local filteredstring = game:GetService("Chat"):FilterStringForBroadcast(string, LOCALPLAYER)
Report Abuse
Physalus is not online. Physalus
Joined: 18 Dec 2013
Total Posts: 77
02 Feb 2017 06:24 PM
Do I place that in the same script? and should I paste it, starting the entire script?
Report Abuse
AggressiveCatch is not online. AggressiveCatch
Joined: 17 Jul 2011
Total Posts: 5840
02 Feb 2017 06:26 PM
mod.Name = game:GetService("Chat"):FilterStringForBroadCast(script.Parent.Text, v)



I think that, unless chat has to be filtered on the server idk
Report Abuse
Physalus is not online. Physalus
Joined: 18 Dec 2013
Total Posts: 77
02 Feb 2017 06:27 PM
So like this;



local string = textbox.Text

local filteredstring = game:GetService("Chat"):FilterStringForBroadcast(string, LOCALPLAYER)

script.Parent.FocusLost:connect(function(enter)
if enter then
v = game.Players.LocalPlayer
for a, mod in pairs(v.Character:children()) do
if mod:findFirstChild("NameTag") then
v.Character.Head.Transparency = 0 mod:Destroy()
end
end

local char = v.Character
local mod = Instance.new("Model", char)
mod.Name = script.Parent.Text
local cl = char.Head:Clone()
cl.Parent = mod

local hum = Instance.new("Humanoid", mod)
hum.Name = "NameTag"
hum.MaxHealth = 0
hum.Health = 0

local weld = Instance.new("Weld", cl) weld.Part0 = cl weld.Part1 = char.Head
char.Head.Transparency = 1
end
end)
Report Abuse
AggressiveCatch is not online. AggressiveCatch
Joined: 17 Jul 2011
Total Posts: 5840
02 Feb 2017 06:28 PM
im going to assume that you didn't see my most recent reply...
Report Abuse
Physalus is not online. Physalus
Joined: 18 Dec 2013
Total Posts: 77
02 Feb 2017 06:29 PM
Lmao just saw it
Report Abuse
Physalus is not online. Physalus
Joined: 18 Dec 2013
Total Posts: 77
02 Feb 2017 06:30 PM
Im just confuse where I put it in the script.
Report Abuse
Intended_Pun is not online. Intended_Pun
Joined: 10 Aug 2016
Total Posts: 4384
02 Feb 2017 06:30 PM
script.Parent.FocusLost:connect(function(enter)
if enter then
v = game.Players.LocalPlayer
for a, mod in pairs(v.Character:children()) do
if mod:findFirstChild("NameTag") then
v.Character.Head.Transparency = 0 mod:Destroy()
end
end

local char = v.Character
local mod = Instance.new("Model", char)
mod.Name = game:GetService("Chat"):FilterStringForBroadcast(v, script.Parent.Text)
local cl = char.Head:Clone()
cl.Parent = mod

local hum = Instance.new("Humanoid", mod)
hum.Name = "NameTag"
hum.MaxHealth = 0
hum.Health = 0

local weld = Instance.new("Weld", cl) weld.Part0 = cl weld.Part1 = char.Head
char.Head.Transparency = 1
end
end)
Report Abuse
AggressiveCatch is not online. AggressiveCatch
Joined: 17 Jul 2011
Total Posts: 5840
02 Feb 2017 06:32 PM
guy above me mixed up the player and the string arguments

put my line where he edited yours
Report Abuse
Physalus is not online. Physalus
Joined: 18 Dec 2013
Total Posts: 77
02 Feb 2017 06:33 PM
The change name GUI should work in studio if you go on test mode right? Cause I put that script in and it wont show any text.
Report Abuse
Physalus is not online. Physalus
Joined: 18 Dec 2013
Total Posts: 77
02 Feb 2017 06:33 PM
Ok
Report Abuse
Physalus is not online. Physalus
Joined: 18 Dec 2013
Total Posts: 77
02 Feb 2017 06:37 PM
Their is a error with the (v)

mod.Name = game:GetService("Chat"):FilterStringForBroadCast(script.Parent.Text, v)
Report Abuse
Physalus is not online. Physalus
Joined: 18 Dec 2013
Total Posts: 77
02 Feb 2017 06:43 PM
I have;


script.Parent.FocusLost:connect(function(enter)
if enter then
v = game.Players.LocalPlayer
for a, mod in pairs(v.Character:children()) do
if mod:findFirstChild("NameTag") then
v.Character.Head.Transparency = 0 mod:Destroy()
end
end

local char = v.Character
local mod = Instance.new("Model", char)
mod.Name = game:GetService("Chat"):FilterStringForBroadCast(script.Parent.Text, v)
local cl = char.Head:Clone()
cl.Parent = mod

local hum = Instance.new("Humanoid", mod)
hum.Name = "NameTag"
hum.MaxHealth = 0
hum.Health = 0

local weld = Instance.new("Weld", cl) weld.Part0 = cl weld.Part1 = char.Head
char.Head.Transparency = 1
end
end)


The v on this line has the blue line under it;

v = game.Players.LocalPlayer
Report Abuse
Ryan_Sch is not online. Ryan_Sch
Joined: 11 Nov 2012
Total Posts: 1478
02 Feb 2017 06:51 PM
No, you need to send the text to a serverscript to filter it because local scripts cannot filter text. You will need to use to use remote events for this.

http://wiki.roblox.com/index.php?title=Text_Filtering
Report Abuse
Ryan_Sch is not online. Ryan_Sch
Joined: 11 Nov 2012
Total Posts: 1478
02 Feb 2017 06:52 PM
Also your 'v' has the line because it's undeclared. This is because your function will not fire before that line of code.
Report Abuse
Intended_Pun is not online. Intended_Pun
Joined: 10 Aug 2016
Total Posts: 4384
02 Feb 2017 06:59 PM
You can filter text locally now.

script.Parent.FocusLost:connect(function(enter)
if enter then
v = game.Players.LocalPlayer
for a, mod in pairs(v.Character:children()) do
if mod:findFirstChild("NameTag") then
v.Character.Head.Transparency = 0 mod:Destroy()
end
end

local char = v.Character
local mod = Instance.new("Model", char)
mod.Name = game:GetService("Chat"):FilterStringForBroadcast(game.Players.LocalPlayer, script.Parent.Text)
local cl = char.Head:Clone()
cl.Parent = mod

local hum = Instance.new("Humanoid", mod)
hum.Name = "NameTag"
hum.MaxHealth = 0
hum.Health = 0

local weld = Instance.new("Weld", cl) weld.Part0 = cl weld.Part1 = char.Head
char.Head.Transparency = 1
end
end)
Report Abuse
Intended_Pun is not online. Intended_Pun
Joined: 10 Aug 2016
Total Posts: 4384
02 Feb 2017 07:00 PM
Also yeah my argument order was wrong, meant to fix it.
Report Abuse
Physalus is not online. Physalus
Joined: 18 Dec 2013
Total Posts: 77
02 Feb 2017 07:09 PM
Okay so how do I get the Filtered Chat localscript to work? Yet I am still confused.
Report Abuse
Physalus is not online. Physalus
Joined: 18 Dec 2013
Total Posts: 77
02 Feb 2017 07:09 PM
I've read the roblox wiki page but can't seem to understand it clearly.
Report Abuse
LegomasterNiko is not online. LegomasterNiko
Joined: 27 Feb 2013
Total Posts: 1176
02 Feb 2017 08:10 PM
There should be a YouTube video on this.
Report Abuse
TheProMProduct is not online. TheProMProduct
Joined: 20 Nov 2014
Total Posts: 20
19 Nov 2017 06:16 AM
script.Parent.FocusLost:connect(function(enter) if enter then local v = game.Players.LocalPlayer for a, mod in pairs(v.Character:children()) do if mod:findFirstChild("NameTag") then v.Character.Head.Transparency = 0 mod:Destroy() end end local char = v.Character local mod = Instance.new("Model", char) mod.Name = game:GetService("Chat"):FilterStringForBroadcast(script.Parent.Text, v) local cl = char.Head:Clone() cl.Parent = mod local hum = Instance.new("Humanoid", mod) hum.Name = "NameTag" hum.MaxHealth = 0 hum.Health = 0 local weld = Instance.new("Weld", cl) ########## # ## weld.Part1 = char.Head char.Head.Transparency = 1 end end) This one should work
Report Abuse
TheProMProduct is not online. TheProMProduct
Joined: 20 Nov 2014
Total Posts: 20
19 Nov 2017 06:22 AM
Rlly, gotta love the filter

Use "mod.Name = game:GetService("Chat"):FilterStringForBroadcast(script.Parent.Text, v)" and it will work
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