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: Bug with chat script

Previous Thread :: Next Thread 
BFFstick00 is not online. BFFstick00
Joined: 25 Oct 2010
Total Posts: 800
23 May 2015 03:13 PM
My game(which is a MASSIVE work-in-progress) has a custom chat system. It doesn't seem to work outside of studio. I have filtering enabled and I am wondering about that. Here is the server-side script:
script.Chatted.OnServerEvent:connect(function(player, msg)
broadcast(player.Name..":"..msg)
end)
function broadcast(msg)
addChat(msg, game.StarterGui.Chat)
for l, p in pairs(game.Players:GetChildren()) do
addChat(msg, p.PlayerGui.Chat)
end
end
function addChat(msg, obj)
obj.ChatFrame.Line0.Text = obj.ChatFrame.Line1.Text
obj.ChatFrame.Line1.Text = obj.ChatFrame.Line2.Text
obj.ChatFrame.Line2.Text = obj.ChatFrame.Line3.Text
obj.ChatFrame.Line3.Text = obj.ChatFrame.Line4.Text
obj.ChatFrame.Line4.Text = obj.ChatFrame.Line5.Text
obj.ChatFrame.Line5.Text = obj.ChatFrame.Line6.Text
obj.ChatFrame.Line6.Text = obj.ChatFrame.Line7.Text
obj.ChatFrame.Line7.Text = obj.ChatFrame.Line8.Text
obj.ChatFrame.Line8.Text = msg
end
And here is the caller of the RemoteEvent:
game.ServerScriptService.ServerChat.Chatted:FireServer(script.Parent.Input.Text)
Report Abuse
Anticodist is not online. Anticodist
Joined: 05 Feb 2014
Total Posts: 1191
23 May 2015 03:17 PM
There is a way to up the efficiency of the code; however, to answer your question, I would recommend using a RemoteFunction. It's my understanding you're trying to yield or return something.



-𝒩 | Anticodist, Scripter
Report Abuse
BFFstick00 is not online. BFFstick00
Joined: 25 Oct 2010
Total Posts: 800
23 May 2015 03:19 PM
I don't want to yield or return anything actually. I just want it to pass an argument from a server script from a client script.
Report Abuse
BFFstick00 is not online. BFFstick00
Joined: 25 Oct 2010
Total Posts: 800
23 May 2015 03:19 PM
And I don't want to make it more efficient yet. I am going to make MAJOR changes.
Report Abuse
BFFstick00 is not online. BFFstick00
Joined: 25 Oct 2010
Total Posts: 800
23 May 2015 03:29 PM
Still unanswered
Report Abuse
BFFstick00 is not online. BFFstick00
Joined: 25 Oct 2010
Total Posts: 800
23 May 2015 03:41 PM
Bump again ;-;
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
23 May 2015 03:51 PM
Anticodist I suggest you stop using FE (if you do) since it's clear you have no idea what the hel you're doing

OP any GUIs that aren't created on the server (this includes GUIs in StarterGui) won't be accessible in server scripts
Report Abuse
BFFstick00 is not online. BFFstick00
Joined: 25 Oct 2010
Total Posts: 800
23 May 2015 05:13 PM
@above That was unhelpful and unnecessary.
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
23 May 2015 05:15 PM
I help two people and I'm unhelpful?
Report Abuse
BFFstick00 is not online. BFFstick00
Joined: 25 Oct 2010
Total Posts: 800
23 May 2015 05:18 PM
BothAngels:"Anticodist I suggest you stop using FE (if you do) since it's clear you have no idea what the hel you're doing"
Wiki:"A sound way to prevent exploits is to turn on FilteringEnabled in your Workspace's properties."
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
23 May 2015 05:26 PM
He should learn when to use RemoteFunctions
and why r u still here i already helped u lol
Report Abuse
BFFstick00 is not online. BFFstick00
Joined: 25 Oct 2010
Total Posts: 800
23 May 2015 05:27 PM
How did you help?
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
23 May 2015 05:32 PM
Read the second part of my unhelpful post
Report Abuse
Anticodist is not online. Anticodist
Joined: 05 Feb 2014
Total Posts: 1191
23 May 2015 05:36 PM
I just read this thread. You should learn how to take people's advice.



-𝒩 | Anticodist, Scripter
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