Seeumliam
|
  |
| Joined: 06 May 2013 |
| Total Posts: 5662 |
|
|
| 18 Dec 2014 08:59 AM |
error is something like PlayerGui is not a member of Player
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 |
|
| |
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
| |
|
Seeumliam
|
  |
| Joined: 06 May 2013 |
| Total Posts: 5662 |
|
| |
|
Seeumliam
|
  |
| Joined: 06 May 2013 |
| Total Posts: 5662 |
|
|
| 18 Dec 2014 03:37 PM |
Still not working
~ Seeumliam ~ |
|
|
| Report Abuse |
|
|
Seeumliam
|
  |
| Joined: 06 May 2013 |
| Total Posts: 5662 |
|
|
| 18 Dec 2014 03:38 PM |
When I tested it with two players in solo mode I got that error... it was for when you went to access the other players PlayerGui
~ Seeumliam ~ |
|
|
| Report Abuse |
|
|
|
| 18 Dec 2014 03:55 PM |
add
repeat wait() until Players.LocalPlayer.PlayerGui
? |
|
|
| Report Abuse |
|
|
Seeumliam
|
  |
| Joined: 06 May 2013 |
| Total Posts: 5662 |
|
|
| 18 Dec 2014 03:57 PM |
Where am I adding that at?
~ Seeumliam ~ |
|
|
| Report Abuse |
|
|
|
| 18 Dec 2014 03:59 PM |
| at the top, so it's the first thing the script repeats, until it finds PlayerGui. |
|
|
| Report Abuse |
|
|
parkiet3
|
  |
| Joined: 16 Jul 2011 |
| Total Posts: 832 |
|
| |
|
Seeumliam
|
  |
| Joined: 06 May 2013 |
| Total Posts: 5662 |
|
|
| 18 Dec 2014 04:04 PM |
wait are you telling me to add it here? like this?
function onclick()
repeat wait() until Players.LocalPlayer.PlayerGui
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 |
|
|
|
| 18 Dec 2014 04:05 PM |
That isn't the top.
repeat wait() until Players.LocalPlayer.PlayerGui
function onclick() |
|
|
| Report Abuse |
|
|
Seeumliam
|
  |
| Joined: 06 May 2013 |
| Total Posts: 5662 |
|
|
| 18 Dec 2014 04:05 PM |
And it is not the local players gui, I need the other players gui. The player that is within 100 studs
~ Seeumliam ~ |
|
|
| Report Abuse |
|
|
parkiet3
|
  |
| Joined: 16 Jul 2011 |
| Total Posts: 832 |
|
|
| 18 Dec 2014 04:09 PM |
| Give me the error and the line if you want help |
|
|
| Report Abuse |
|
|
Seeumliam
|
  |
| Joined: 06 May 2013 |
| Total Posts: 5662 |
|
|
| 18 Dec 2014 04:15 PM |
My current error which is not making any sence is One is not a valid member of ScreenGui Script 'Players.Player1.PlayerGui.Chat.Textbar.TextButton.LocalScri', Line 12
~ Seeumliam ~ |
|
|
| Report Abuse |
|
|
|
| 18 Dec 2014 04:17 PM |
| in Chat, does it say "One" or "one" |
|
|
| Report Abuse |
|
|
parkiet3
|
  |
| Joined: 16 Jul 2011 |
| Total Posts: 832 |
|
|
| 18 Dec 2014 04:19 PM |
| Isnt there a frame between those labels |
|
|
| Report Abuse |
|
|
Seeumliam
|
  |
| Joined: 06 May 2013 |
| Total Posts: 5662 |
|
|
| 18 Dec 2014 04:21 PM |
The ord I have things is PlayerGui-Chat-Textbar-TextButton-LocalScript
You are looking at what is in the localscript
~ Seeumliam ~ |
|
|
| Report Abuse |
|
|
Seeumliam
|
  |
| Joined: 06 May 2013 |
| Total Posts: 5662 |
|
|
| 18 Dec 2014 04:22 PM |
wait.... I think I am mission something, you are right I think
~ Seeumliam ~ |
|
|
| Report Abuse |
|
|
parkiet3
|
  |
| Joined: 16 Jul 2011 |
| Total Posts: 832 |
|
|
| 18 Dec 2014 04:22 PM |
| You wrote something wrong recheck it, , case sensitive |
|
|
| Report Abuse |
|
|
Seeumliam
|
  |
| Joined: 06 May 2013 |
| Total Posts: 5662 |
|
|
| 18 Dec 2014 04:25 PM |
So now the first bit works, but I get error:
14:25:08.727 - PlayerGui is not a valid member of Player 14:25:08.730 - Script 'Players.Player2.PlayerGui.Chat.Textbar.TextButton.LocalScri', Line 12
~ Seeumliam ~ |
|
|
| Report Abuse |
|
|
|
| 18 Dec 2014 04:32 PM |
Players.championbuilder.PlayerGui.LocalScript:2: atempt to index field 'Character' (a nil value) Stack Begin Script 'Players.championbuilders.PlayerGui.LocalScript', Line 2 Stack End.
Did you add:
repeat wait() until game.Players.LocalPlayer.PlayerGui |
|
|
| Report Abuse |
|
|
Seeumliam
|
  |
| Joined: 06 May 2013 |
| Total Posts: 5662 |
|
| |
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 18 Dec 2014 04:34 PM |
Silly silly silly If you're in a LocalScript, you can't access other players' PlayerGui. |
|
|
| Report Abuse |
|
|
Seeumliam
|
  |
| Joined: 06 May 2013 |
| Total Posts: 5662 |
|
|
| 18 Dec 2014 04:34 PM |
repeat wait() until game.Players.LocalPlayer.PlayerGui 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.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 script.Parent.MouseButton1Click:connect(onclick)
~ Seeumliam ~ |
|
|
| Report Abuse |
|
|