Seeumliam
|
  |
| Joined: 06 May 2013 |
| Total Posts: 5662 |
|
|
| 17 Dec 2014 01:55 PM |
So with my custom chat I have it so that only people within 100 studs can hear you. Does this look right? Would this find players within 100 studs and allow them to hear you?
--This is the enter button on the chat (This will be the enter key in the future but it is a textbutton right now)
function onclick() if script.Parent.Parent.TextBox.Text ~= "" and script.Parent.Parent.TextBox.Text ~= "Click and type to talk" and script.Parent.Parent.TextBox.Text ~= " "then script.Parent.Parent.Parent.Chat.one.Value = script.Parent.Parent.Parent.Chat.two.Value script.Parent.Parent.Parent.Chat.two.Value = script.Parent.Parent.Parent.Chat.three.Value script.Parent.Parent.Parent.Chat.three.Value = script.Parent.Parent.Parent.Chat.four.Value script.Parent.Parent.Parent.Chat.four.Value = script.Parent.Parent.Parent.Chat.five.Value script.Parent.Parent.Parent.Chat.five.Value = script.Parent.Parent.Parent.Chat.six.Value script.Parent.Parent.Parent.Chat.six.Value = game.Players.LocalPlayer.Name..": "..script.Parent.Parent.TextBox.Text script.Parent.Parent.TextBox.Text = "Click and type to talk" local plrs = game.Players:GetChildren() local torso = game.Players.LocalPlayer.Character.Torso for i,plr in ipairs(plrs) do if plr.Character:findFirstChild("Humanoid") and plr.Character.Humanoid.Health > 0 then local tor = plr.Character.Torso if (torso.Position - tor.Position).magnitude < 100 then plr.PlayerGui.Chat.one.Value = plr.PlayerGui.Chat.two.Value plr.PlayerGui.Chat.two.Value = plr.PlayerGui.Chat.three.Value plr.PlayerGui.Chat.three.Value = plr.PlayerGui.Chat.four.Value plr.PlayerGui.Chat.four.Value = plr.PlayerGui.Chat.five.Value plr.PlayerGui.Chat.five.Value = plr.PlayerGui.Chat.six.Value plr.PlayerGui.Chat.six.Value = game.Players.LocalPlayer.Name..": "..script.Parent.Parent.TextBox.Text end end end end end script.Parent.MouseButton1Click:connect(onclick)
~ Seeumliam ~ |
|
|
| Report Abuse |
|
|
Seeumliam
|
  |
| Joined: 06 May 2013 |
| Total Posts: 5662 |
|
|
| 17 Dec 2014 02:13 PM |
I just tested it with two people and it doesn't work... I get no errors.. can someone help?
~ Seeumliam ~ |
|
|
| Report Abuse |
|
|
Seeumliam
|
  |
| Joined: 06 May 2013 |
| Total Posts: 5662 |
|
|
| 17 Dec 2014 02:22 PM |
So I fixed some problems... but one thing is, is when a player gets in range of me and I talk... I can't talk again and they can't hear me... Can you help? I think it is where it finds a player not with your name.
function onclick() if script.Parent.Parent.TextBox.Text ~= "" and script.Parent.Parent.TextBox.Text ~= "Click and type to talk" and script.Parent.Parent.TextBox.Text ~= " "then script.Parent.Parent.Parent.Chat.one.Value = script.Parent.Parent.Parent.Chat.two.Value script.Parent.Parent.Parent.Chat.two.Value = script.Parent.Parent.Parent.Chat.three.Value script.Parent.Parent.Parent.Chat.three.Value = script.Parent.Parent.Parent.Chat.four.Value script.Parent.Parent.Parent.Chat.four.Value = script.Parent.Parent.Parent.Chat.five.Value script.Parent.Parent.Parent.Chat.five.Value = script.Parent.Parent.Parent.Chat.six.Value script.Parent.Parent.Parent.Chat.six.Value = game.Players.LocalPlayer.Name..": "..script.Parent.Parent.TextBox.Text script.Parent.Parent.TextBox.Text = "Click and type to talk" local plrs = game.Players:GetChildren() local torso = game.Players.LocalPlayer.Character.Torso for i,plr in ipairs(plrs) do if plr.Character:findFirstChild("Humanoid") and plr.Character.Humanoid.Health > 0 then local tor = plr.Character.Torso if (torso.Position - tor.Position).magnitude < 100 then if plr.Name ~= game.Players.LocalPlayer.Name then plr.PlayerGui.Chat.Chat.one.Value = plr.PlayerGui.Chat.Chat.two.Value plr.PlayerGui.Chat.Chat.two.Value = plr.PlayerGui.Chat.Chat.three.Value plr.PlayerGui.Chat.Chat.three.Value = plr.PlayerGui.Chat.Chat.four.Value plr.PlayerGui.Chat.Chat.four.Value = plr.PlayerGui.Chat.Chat.five.Value plr.PlayerGui.Chat.Chat.five.Value = plr.PlayerGui.Chat.Chat.six.Value plr.PlayerGui.Chat.Chat.six.Value = game.Players.LocalPlayer.Name..": "..script.Parent.Parent.TextBox.Text script.Parent.Parent.TextBox.Text = "Click and type to talk" end end end end end end script.Parent.MouseButton1Click:connect(onclick)
~ Seeumliam ~ |
|
|
| Report Abuse |
|
|
Seeumliam
|
  |
| Joined: 06 May 2013 |
| Total Posts: 5662 |
|
|
| 17 Dec 2014 03:17 PM |
So I got rid of most of it and made it so it would tell yourself what you said what is wrong?
function onclick()
if script.Parent.Parent.TextBox.Text ~= "" and script.Parent.Parent.TextBox.Text ~= "Click and type to talk" and script.Parent.Parent.TextBox.Text ~= " "then
local plrs = game.Players:GetChildren() local torso = game.Players.LocalPlayer.Character.Torso for i,plr in ipairs(plrs) do if plr.Character:findFirstChild("Humanoid") and plr.Character.Humanoid.Health > 0 then local tor = plr.Character.Torso if (torso.Position - tor.Position).magnitude < 100 then plr.PlayerGui.Chat.one.Value = plr.PlayerGui.Chat.two.Value plr.PlayerGui.Chat.two.Value = plr.PlayerGui.Chat.three.Value plr.PlayerGui.Chat.three.Value = plr.PlayerGui.Chat.four.Value plr.PlayerGui.Chat.four.Value = plr.PlayerGui.Chat.five.Value plr.PlayerGui.Chat.five.Value = plr.PlayerGui.Chat.six.Value plr.PlayerGui.Chat.six.Value = game.Players.LocalPlayer.Name..": "..script.Parent.Parent.TextBox.Text script.Parent.Parent.TextBox.Text = "Click and type to talk" end end end end end script.Parent.MouseButton1Click:connect(onclick)
~ Seeumliam ~ |
|
|
| Report Abuse |
|
|
Seeumliam
|
  |
| Joined: 06 May 2013 |
| Total Posts: 5662 |
|
| |
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 17 Dec 2014 04:53 PM |
| What's wrong with setting the chat bubble range to 100 |
|
|
| Report Abuse |
|
|
|
| 17 Dec 2014 04:54 PM |
Because people can still see it in the gui, I guess.
But all you have to do is disable the gui and set he chat bubble range to 100
Deal with it |
|
|
| Report Abuse |
|
|
Seeumliam
|
  |
| Joined: 06 May 2013 |
| Total Posts: 5662 |
|
|
| 17 Dec 2014 05:30 PM |
I don't want to use the bubble because it is hard to read if you are behind a wall.... mine makes it like you are talking normal chat, but it is only in proximity
~ Seeumliam ~ |
|
|
| Report Abuse |
|
|
Seeumliam
|
  |
| Joined: 06 May 2013 |
| Total Posts: 5662 |
|
| |
|
Seeumliam
|
  |
| Joined: 06 May 2013 |
| Total Posts: 5662 |
|
|
| 17 Dec 2014 06:49 PM |
I think it is something in here:
local plrs = game.Players:GetChildren() local torso = game.Players.LocalPlayer.Character.Torso for i,plr in ipairs(plrs) do if plr.Character:findFirstChild("Humanoid") and plr.Character.Humanoid.Health > 0 then local tor = plr.Character.Torso if (torso.Position - tor.Position).magnitude < 100 then
I can talk to myself, but when I chat to another player it doesn't show anything. And then when I go to talk again when close to another player it won't let me type
~ Seeumliam ~ |
|
|
| Report Abuse |
|
|