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
 

How do i fix this "Team Chat" script?

Previous Thread :: Next Thread 
FulcrumFriction is not online. FulcrumFriction
Joined: 31 Mar 2013
Total Posts: 76
26 Feb 2015 01:28 PM
I have this team chat script, and i keep getting this error with one of the (End)(S) in the script. Here is the script...

self = script.Parent
gW = game.Workspace
gL = game.Lighting

game.Players.PlayerAdded:connect(function(np)
repeat wait(1) until np:findFirstChild("PlayerGui")
np.Chatted:connect(function(IM)
for i, v in pairs(game.Players:GetChildren()) do
for g = 1,2,3 do
for i, v1 in pairs(script["Side"..g..""]:GetChildren()) do
if np.TeamColor == v1.Value then
for i, v2 in pairs(script["Side"..g..""]:GetChildren()) do
if v.TeamColor == v2.Value then
for i, v3 in pairs(script["Side" ..g..""]:GetChildern()) do
if v.TeamColor == v3.Value then
v.PlayerGui.TeamChatGUI.input.Value = ""..np.Name..": "..IM..
end
end
end
end
end
end
end
end
end)
end)

The very first end after the last command is underlined in red. Output is telling me there is a unexpected symbol. But what does that mean? I tried everything..
Report Abuse
Dr01d3k4 is not online. Dr01d3k4
Joined: 11 Oct 2007
Total Posts: 17916
26 Feb 2015 01:31 PM
1) You didn't finish the line. You have ..IM.. but then nothing after that .. It expects something on the right
2) Your algorithm is n³... what are you doing?
Report Abuse
iondriver is not online. iondriver
Joined: 18 Nov 2012
Total Posts: 757
26 Feb 2015 01:32 PM
Should be fixed.

self = script.Parent
gW = game.Workspace
gL = game.Lighting

game.Players.PlayerAdded:connect(function(np)
repeat wait(1) until np:findFirstChild("PlayerGui")
np.Chatted:connect(function(IM)
for i, v in pairs(game.Players:GetChildren()) do
for g = 1,2,3 do
for i, v1 in pairs(script["Side"..g..""]:GetChildren()) do
if np.TeamColor == v1.Value then
for i, v2 in pairs(script["Side"..g..""]:GetChildren()) do
if v.TeamColor == v2.Value then
for i, v3 in pairs(script["Side" ..g..""]:GetChildern()) do
if v.TeamColor == v3.Value then
v.PlayerGui.TeamChatGUI.input.Value = ""..np.Name..": "..IM
end
end
end
end
end
end
end
end
end)
end)

You had .. after IM, The computer thought that you needed to concatenate something.
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