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 » Scripting Helpers
Home Search
 

Re: Chat GUI problems

Previous Thread :: Next Thread 
GeniusBuilder is not online. GeniusBuilder
Joined: 20 Jan 2010
Total Posts: 2159
30 Dec 2012 11:14 AM
I don't have any experience with onChatted functions and when I earlier asked someone to help I got this, which doesn't work:

A = script.Parent.A
B = script.Parent.B
C = script.Parent.C
D = script.Parent.D
E = script.Parent.E
F = script.Parent.F
G = script.Parent.G
H = script.Parent.H
I = script.Parent.I
J = script.Parent.J

game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(msg)
J.Text = I.Text
I.Text = H.Text
H.Text = G.Text
G.Text = F.Text
F.Text = E.Text
E.Text = D.Text
D.Text = C.Text
C.Text = B.Text
B.Text = A.Text
A.Text = player.Name .. ": " .. msg
end)
end)

Help please?
Report Abuse
Usering is not online. Usering
Joined: 18 Aug 2012
Total Posts: 10281
30 Dec 2012 12:05 PM
What's 'onChatted?'

~ Secrets Shall Lead Us To The End ~
Report Abuse
GeniusBuilder is not online. GeniusBuilder
Joined: 20 Jan 2010
Total Posts: 2159
30 Dec 2012 12:29 PM
Oh wait it's just Chatted, I just said that I have never tried chat functions myself so don't expect me to say everything right.
Report Abuse
GeniusBuilder is not online. GeniusBuilder
Joined: 20 Jan 2010
Total Posts: 2159
31 Dec 2012 05:09 AM
Bump
Report Abuse
cheatmaster18 is not online. cheatmaster18
Joined: 29 Oct 2010
Total Posts: 1871
31 Dec 2012 06:02 AM
Output?
Report Abuse
TheMyrco is not online. TheMyrco
Joined: 13 Aug 2011
Total Posts: 15105
31 Dec 2012 06:05 AM
This should work.
Report Abuse
GeniusBuilder is not online. GeniusBuilder
Joined: 20 Jan 2010
Total Posts: 2159
31 Dec 2012 06:08 AM
It just shows the chat of the person who joined last
Report Abuse
TheMyrco is not online. TheMyrco
Joined: 13 Aug 2011
Total Posts: 15105
31 Dec 2012 06:10 AM
The script is correct...and if you want to make it different then add/edit things. You are unclear.
Report Abuse
GeniusBuilder is not online. GeniusBuilder
Joined: 20 Jan 2010
Total Posts: 2159
31 Dec 2012 06:12 AM
The script is correct if you wanted a chat that only shows the chat of a person that joined after you. I want it to show everyone's chat.
Report Abuse
cheatmaster18 is not online. cheatmaster18
Joined: 29 Oct 2010
Total Posts: 1871
31 Dec 2012 06:14 AM
If it does not work you may have missed something in the Gui
Report Abuse
TheMyrco is not online. TheMyrco
Joined: 13 Aug 2011
Total Posts: 15105
31 Dec 2012 06:14 AM
Just add more Guis and then place the player's poop in there.
And please mention that in your first post...
Report Abuse
GeniusBuilder is not online. GeniusBuilder
Joined: 20 Jan 2010
Total Posts: 2159
31 Dec 2012 06:17 AM
Duplicating the chat GUI fixes it? I'm 100% sure that's not working rofl
Report Abuse
TheMyrco is not online. TheMyrco
Joined: 13 Aug 2011
Total Posts: 15105
31 Dec 2012 06:17 AM
rofl im so sore dat yo naw listning
Report Abuse
GeniusBuilder is not online. GeniusBuilder
Joined: 20 Jan 2010
Total Posts: 2159
31 Dec 2012 06:21 AM
Do you even know what's the point of chat?
Report Abuse
cheatmaster18 is not online. cheatmaster18
Joined: 29 Oct 2010
Total Posts: 1871
31 Dec 2012 06:24 AM
I can try to find a way to fix the problem
Report Abuse
GeniusBuilder is not online. GeniusBuilder
Joined: 20 Jan 2010
Total Posts: 2159
31 Dec 2012 06:27 AM
It probably needs some kind of a loop to find all players
Report Abuse
TheAwesomenessDude is not online. TheAwesomenessDude
Joined: 17 Jul 2011
Total Posts: 11602
31 Dec 2012 06:45 AM
lolnope. No loop.

game.Players.PlayerAdded:connect(function(plyr)
plyr.Chatted:connect(function(msg)
print(plyr.Name..": "..msg)
end
end

If I said Hi! It would print:

TheAwesomenessDude: Hi!

Report Abuse
TheAwesomenessDude is not online. TheAwesomenessDude
Joined: 17 Jul 2011
Total Posts: 11602
31 Dec 2012 06:46 AM
Forgot the brackets after the ends. Last two lines should be:

end)
end)
Report Abuse
cheatmaster18 is not online. cheatmaster18
Joined: 29 Oct 2010
Total Posts: 1871
31 Dec 2012 07:06 AM
Script in workspace:

root = game.Lighting.Chat
A = root.A
B = root.B
C = root.C
D = root.D
E = root.E
F = root.F
G = root.G
H = root.H
I = root.I
J = root.J

for i,player in ipairs(game.Players:GetPlayers()) do
    player.Chatted:connect(function(msg)
        J.Value = I.Value
        I.Value = H.Value
        H.Value = G.Value
        G.Value = F.Value
        F.Value = E.Value
        E.Value = D.Value
        D.Value = C.Value
        C.Value = B.Value
        B.Value = A.Value
        A.Value = player.Name .. ": " .. msg
    end)
end

game.Players.PlayerAdded:connect(function(player)
    player.Chatted:connect(function(msg)
        J.Text = I.Text
        I.Text = H.Text
        H.Text = G.Text
        G.Text = F.Text
        F.Text = E.Text
        E.Text = D.Text
        D.Text = C.Text
        C.Text = B.Text
        B.Text = A.Text
        A.Text = player.Name .. ": " .. msg
    end)
end)




Script in PlayerGui:

root = game.Lighting.Chat

for i,v in ipairs(root:GetChildren()) do
    script.Parent[v.Name].Text = v.Value
end
for i,v in ipairs(root:GetChildren()) do
    v.Changed:connect(function()
        script.Parent[v.Name].Text = v.Value
    end)
end



In Lighting:

game.Lighting --> Chat --> Chats (A, B, C ect...)

Report Abuse
cheatmaster18 is not online. cheatmaster18
Joined: 29 Oct 2010
Total Posts: 1871
31 Dec 2012 07:10 AM
also the Chats (A, B, C ect...) in Lighting have to be a StringValue
Report Abuse
GeniusBuilder is not online. GeniusBuilder
Joined: 20 Jan 2010
Total Posts: 2159
31 Dec 2012 07:20 AM
How do you always make the scripts so complicated lol?
Report Abuse
cheatmaster18 is not online. cheatmaster18
Joined: 29 Oct 2010
Total Posts: 1871
31 Dec 2012 07:23 AM
I did so the scripts use Lighting to get the chat so every one have same text at the screen, for me it is easy to understand it
Report Abuse
cheatmaster18 is not online. cheatmaster18
Joined: 29 Oct 2010
Total Posts: 1871
31 Dec 2012 07:25 AM
remember that it is two scripts not one
Report Abuse
GeniusBuilder is not online. GeniusBuilder
Joined: 20 Jan 2010
Total Posts: 2159
31 Dec 2012 07:30 AM
I've done some complicated scripts too and the game I'm putting the chat GUI into has a lot of those but I'm sure there's a way to make the chat GUI work without multiple scripts.
Report Abuse
cheatmaster18 is not online. cheatmaster18
Joined: 29 Oct 2010
Total Posts: 1871
31 Dec 2012 07:31 AM
ops, I forgot something in the first script

root = game.Lighting.Chat
A = root.A
B = root.B
C = root.C
D = root.D
E = root.E
F = root.F
G = root.G
H = root.H
I = root.I
J = root.J

for i,player in ipairs(game.Players:GetPlayers()) do
    player.Chatted:connect(function(msg)
        J.Value = I.Value
        I.Value = H.Value
        H.Value = G.Value
        G.Value = F.Value
        F.Value = E.Value
        E.Value = D.Value
        D.Value = C.Value
        C.Value = B.Value
        B.Value = A.Value
        A.Value = player.Name .. ": " .. msg
    end)
end

game.Players.PlayerAdded:connect(function(player)
    player.Chatted:connect(function(msg)
        J.Value = I.Value
        I.Value = H.Value
        H.Value = G.Value
        G.Value = F.Value
        F.Value = E.Value
        E.Value = D.Value
        D.Value = C.Value
        C.Value = B.Value
        B.Value = A.Value
        A.Value = player.Name .. ": " .. msg
    end)
end)

this one is correct
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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