DarkComa
|
  |
| Joined: 01 Apr 2011 |
| Total Posts: 11679 |
|
|
| 05 Feb 2014 01:20 PM |
This script is meant to change the text on a gui on your screen. It works fine in solo, but it doesn't work in multiplayer.
function onClicked(playerWhoClicked) game.Players.Player.PlayerGui.brogui.TextLabelswag.Text = "Testing" end script.Parent.ClickDetector.MouseClick:connect(onClicked)
dat creepy bunny who stares through your window |
|
|
| Report Abuse |
|
|
DarkComa
|
  |
| Joined: 01 Apr 2011 |
| Total Posts: 11679 |
|
|
| 05 Feb 2014 01:24 PM |
Bump.
dat creepy bunny who stares through your window |
|
|
| Report Abuse |
|
|
DarkComa
|
  |
| Joined: 01 Apr 2011 |
| Total Posts: 11679 |
|
|
| 05 Feb 2014 01:26 PM |
bump2
dat creepy bunny who stares through your window |
|
|
| Report Abuse |
|
|
|
| 05 Feb 2014 01:27 PM |
Make sure it is a local script.
function onClicked(playerWhoClicked) if not game.Players.LocalPlayer then return end game.Players.LocalPlayer.PlayerGui.brogui.TextLabelswag.Text = "Testing" end script.Parent.ClickDetector.MouseClick:connect(onClicked)
-DrRandomous :p |
|
|
| Report Abuse |
|
|
DarkComa
|
  |
| Joined: 01 Apr 2011 |
| Total Posts: 11679 |
|
|
| 05 Feb 2014 01:30 PM |
Thanks, but where do I put the Local Script?
dat creepy bunny who stares through your window |
|
|
| Report Abuse |
|
|
|
| 05 Feb 2014 01:31 PM |
This is also a solution:
>game.Players.Player.PlayerGui.brogui.TextLabelswag.Text = "Testing"
replace this with
game.Players:findFirstChild(playerWhoClicked.Name).PlayerGui.PlayerGui.brogui.TextLabelswag.Text = "Testing" |
|
|
| Report Abuse |
|
|
DarkComa
|
  |
| Joined: 01 Apr 2011 |
| Total Posts: 11679 |
|
|
| 05 Feb 2014 01:35 PM |
Doesn't work.
dat creepy bunny who stares through your window |
|
|
| Report Abuse |
|
|
|
| 05 Feb 2014 01:40 PM |
| Is it a ClickDetector in workspace or a GUI in the PlayerGui where this script is located? |
|
|
| Report Abuse |
|
|
DarkComa
|
  |
| Joined: 01 Apr 2011 |
| Total Posts: 11679 |
|
|
| 05 Feb 2014 01:43 PM |
The click detector is in the part and the script is in the part.
dat creepy bunny who stares through your window |
|
|
| Report Abuse |
|
|
DarkComa
|
  |
| Joined: 01 Apr 2011 |
| Total Posts: 11679 |
|
|
| 05 Feb 2014 01:47 PM |
bump
dat creepy bunny who stares through your window |
|
|
| Report Abuse |
|
|
DarkComa
|
  |
| Joined: 01 Apr 2011 |
| Total Posts: 11679 |
|
|
| 05 Feb 2014 01:53 PM |
bump
dat creepy bunny who stares through your window |
|
|
| Report Abuse |
|
|
|
| 05 Feb 2014 01:56 PM |
Make sure the 'brogui' is in the PlayerGui of everyone who will be clicking it. I have no idea why my last suggestion didn't work for you, here is the full script I used:
function onClicked(playerWhoClicked) game.Players:findFirstChild(playerWhoClicked.Name).PlayerGui.brogui.TextLabelswag.Text = "Testing" end
script.Parent.ClickDetector.MouseClick:connect(onClicked) |
|
|
| Report Abuse |
|
|
DarkComa
|
  |
| Joined: 01 Apr 2011 |
| Total Posts: 11679 |
|
|
| 05 Feb 2014 02:06 PM |
Oh, it works now. Thank you. :)
dat creepy bunny who stares through your window |
|
|
| Report Abuse |
|
|
|
| 05 Feb 2014 02:07 PM |
No problemo. Good luck scripting. |
|
|
| Report Abuse |
|
|