Rackm
|
  |
| Joined: 07 Jan 2014 |
| Total Posts: 718 |
|
|
| 03 Jul 2014 07:52 PM |
local p = script.Parent.Parent.TextBox1 local s = script.Parent.Parent.TextLabel local shout = game.StarterGui["Shout Gui ~NintendoZERG"]
function shout() if p.Text ~= "Shout" then s.Text = script.Parent.Parent.Parent.Parent.Character.Name.. " says: "..p.Text shout.TextLabel.Text = script.Parent.Parent.Parent.Parent.Character.Name.. " says: "..p.Text end end
script.Parent.MouseButton1Down:connect(shout)
(since it is a shout i want it to update the text to all players.) |
|
|
| Report Abuse |
|
|
Rackm
|
  |
| Joined: 07 Jan 2014 |
| Total Posts: 718 |
|
| |
|
Rackm
|
  |
| Joined: 07 Jan 2014 |
| Total Posts: 718 |
|
| |
|
Rackm
|
  |
| Joined: 07 Jan 2014 |
| Total Posts: 718 |
|
| |
|
Rackm
|
  |
| Joined: 07 Jan 2014 |
| Total Posts: 718 |
|
| |
|
Rackm
|
  |
| Joined: 07 Jan 2014 |
| Total Posts: 718 |
|
| |
|
Rackm
|
  |
| Joined: 07 Jan 2014 |
| Total Posts: 718 |
|
| |
|
badfitz99
|
  |
| Joined: 01 May 2010 |
| Total Posts: 5854 |
|
|
| 04 Jul 2014 01:44 PM |
| Do you know how to do an in pairs loop? |
|
|
| Report Abuse |
|
|
Rackm
|
  |
| Joined: 07 Jan 2014 |
| Total Posts: 718 |
|
| |
|
badfitz99
|
  |
| Joined: 01 May 2010 |
| Total Posts: 5854 |
|
|
| 04 Jul 2014 01:45 PM |
| Then I suggest learning it. Use peasfactory's tutorial on YT |
|
|
| Report Abuse |
|
|
|
| 04 Jul 2014 01:49 PM |
local players = game.Players:GetChildren()
for i = 1,#players do local gui = example:Clone() gui.Parent = players[i].PlayerGui end
|
|
|
| Report Abuse |
|
|
Rackm
|
  |
| Joined: 07 Jan 2014 |
| Total Posts: 718 |
|
|
| 04 Jul 2014 01:52 PM |
Seeing an example of one,
Why would i need that function? I want to make it where it updates everyone's GUI with the shout. No replace it or add a new one of it... |
|
|
| Report Abuse |
|
|
|
| 04 Jul 2014 01:54 PM |
| I'm not giving you the script, I gave you a large example. |
|
|
| Report Abuse |
|
|
Rackm
|
  |
| Joined: 07 Jan 2014 |
| Total Posts: 718 |
|
|
| 04 Jul 2014 01:55 PM |
I know thats what i said, example.
I didn't try to use it. I said why do i need to use it. I don't get it. |
|
|
| Report Abuse |
|
|
Rackm
|
  |
| Joined: 07 Jan 2014 |
| Total Posts: 718 |
|
|
| 04 Jul 2014 01:59 PM |
| Wait i am starting to get it. |
|
|
| Report Abuse |
|
|
Rackm
|
  |
| Joined: 07 Jan 2014 |
| Total Posts: 718 |
|
|
| 04 Jul 2014 02:04 PM |
Could this work?
local p = script.Parent.Parent.TextBox1 local s = script.Parent.Parent.TextLabel local shout = game.StarterGui["Shout Gui ~NintendoZERG"]
function shout() if p.Text ~= "Shout" then local players = game.Players:GetChildren() for i = 1,#players do local update = players[i].PlayerGui["Shout Gui ~NintendoZERG"].TextLabel update.Text = script.Parent.Parent.Parent.Parent.Character.Name.. " says: "..p.Text end s.Text = script.Parent.Parent.Parent.Parent.Character.Name.. " says: "..p.Text shout.TextLabel.Text = script.Parent.Parent.Parent.Parent.Character.Name.. " says: "..p.Text
end end
script.Parent.MouseButton1Down:connect(shout)
(has nobody to test it with so i am asking) |
|
|
| Report Abuse |
|
|
|
| 04 Jul 2014 02:05 PM |
"[i].PlayerGui["Shout Gui ~NintendoZERG"].TextLa"
I don't even understand what you're trying to do here
PlayerGui:findFirstChild'Shout Gui ~NintendoZERG'.TextLabel |
|
|
| Report Abuse |
|
|
FauxHawke
|
  |
| Joined: 08 Jun 2012 |
| Total Posts: 2190 |
|
|
| 04 Jul 2014 02:05 PM |
| Remove the quotations around shout |
|
|
| Report Abuse |
|
|
Rackm
|
  |
| Joined: 07 Jan 2014 |
| Total Posts: 718 |
|
|
| 04 Jul 2014 02:06 PM |
| Thats the name of the GUI. It works fine with that because it updates my own gui by using that. |
|
|
| Report Abuse |
|
|
Rackm
|
  |
| Joined: 07 Jan 2014 |
| Total Posts: 718 |
|
|
| 04 Jul 2014 02:13 PM |
I am getting an error... 15:12:21.914 - Players.Player1.PlayerGui.Shout.TextButton.Script:20: attempt to index upvalue 'shout' (a function value)
Line 20: shout.Text = script.Parent.Parent.Parent.Parent.Character.Name.. " says: "..p.Text |
|
|
| Report Abuse |
|
|
Rackm
|
  |
| Joined: 07 Jan 2014 |
| Total Posts: 718 |
|
|
| 04 Jul 2014 02:15 PM |
woops small mistake nvm.
i already have a function named shout |
|
|
| Report Abuse |
|
|