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 |
|
|
|
| 02 Feb 2017 06:17 PM |
local string = textbox.Text
local filteredstring = game:GetService("Chat"):FilterStringForBroadcast(string, LOCALPLAYER) |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 02 Feb 2017 06:28 PM |
| im going to assume that you didn't see my most recent reply... |
|
|
| Report Abuse |
|
|
Physalus
|
  |
| Joined: 18 Dec 2013 |
| Total Posts: 77 |
|
| |
|
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 |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| 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
|
  |
| Joined: 18 Dec 2013 |
| Total Posts: 77 |
|
| |
|
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
|
  |
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 02 Feb 2017 07:00 PM |
| Also yeah my argument order was wrong, meant to fix it. |
|
|
| Report Abuse |
|
|
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
|
  |
| 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 |
|
|
|
| 02 Feb 2017 08:10 PM |
| There should be a YouTube video on this. |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|