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: Custom Chat not working

Previous Thread :: Next Thread 
Seeumliam is not online. 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 is not online. Seeumliam
Joined: 06 May 2013
Total Posts: 5662
18 Dec 2014 10:08 AM
Bump


~ Seeumliam ~
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
18 Dec 2014 10:10 AM
LocalScript?
Report Abuse
Seeumliam is not online. Seeumliam
Joined: 06 May 2013
Total Posts: 5662
18 Dec 2014 01:57 PM
It is.


~ Seeumliam ~
Report Abuse
Seeumliam is not online. Seeumliam
Joined: 06 May 2013
Total Posts: 5662
18 Dec 2014 03:37 PM
Still not working


~ Seeumliam ~
Report Abuse
Seeumliam is not online. 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
championbuilder is not online. championbuilder
Joined: 20 Jan 2009
Total Posts: 13544
18 Dec 2014 03:55 PM
add

repeat wait() until Players.LocalPlayer.PlayerGui

?
Report Abuse
Seeumliam is not online. Seeumliam
Joined: 06 May 2013
Total Posts: 5662
18 Dec 2014 03:57 PM
Where am I adding that at?


~ Seeumliam ~
Report Abuse
championbuilder is not online. championbuilder
Joined: 20 Jan 2009
Total Posts: 13544
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 is not online. parkiet3
Joined: 16 Jul 2011
Total Posts: 832
18 Dec 2014 03:59 PM
Error line ?
Report Abuse
Seeumliam is not online. 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
championbuilder is not online. championbuilder
Joined: 20 Jan 2009
Total Posts: 13544
18 Dec 2014 04:05 PM
That isn't the top.

repeat wait() until Players.LocalPlayer.PlayerGui

function onclick()
Report Abuse
Seeumliam is not online. 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 is not online. 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 is not online. 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
championbuilder is not online. championbuilder
Joined: 20 Jan 2009
Total Posts: 13544
18 Dec 2014 04:17 PM
in Chat, does it say "One" or "one"
Report Abuse
parkiet3 is not online. parkiet3
Joined: 16 Jul 2011
Total Posts: 832
18 Dec 2014 04:19 PM
Isnt there a frame between those labels
Report Abuse
Seeumliam is not online. 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 is not online. 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 is not online. 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 is not online. 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
championbuilder is not online. championbuilder
Joined: 20 Jan 2009
Total Posts: 13544
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 is not online. Seeumliam
Joined: 06 May 2013
Total Posts: 5662
18 Dec 2014 04:34 PM
Yes I did


~ Seeumliam ~
Report Abuse
eLunate is not online. 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 is not online. 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
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