|
| 02 Mar 2013 07:05 AM |
This script is in a LocalScript, and only seems to work in Test in Studio. Could anyone help?
search = script.Parent.Parent.TextBox NotInDatabase = game.Players.LocalPlayer.PlayerGui.Database.NotInDatabase
function onClicked() if search.Text == "fear" or search.Text == "FEAR" then game.Players.LocalPlayer.PlayerGui.Database.GroupGui.OriginalFEAR.Visible = true else NotInDatabase.Visible = true end end
script.Parent.MouseButton1Down:connect(onClicked) |
|
|
| Report Abuse |
|
|
Infocus
|
  |
| Joined: 28 Apr 2011 |
| Total Posts: 8022 |
|
|
| 02 Mar 2013 07:07 AM |
| Hrs, try adding a wait(1) at the start |
|
|
| Report Abuse |
|
|
|
| 02 Mar 2013 07:12 AM |
| I added a wait(1) after the function onClicked() line, is that what you ment? Or before that? |
|
|
| Report Abuse |
|
|
Infocus
|
  |
| Joined: 28 Apr 2011 |
| Total Posts: 8022 |
|
| |
|
Infocus
|
  |
| Joined: 28 Apr 2011 |
| Total Posts: 8022 |
|
| |
|
|
| 02 Mar 2013 07:15 AM |
| Tried both ways, neither worked. |
|
|
| Report Abuse |
|
|
| |
|
|
| 02 Mar 2013 08:36 AM |
| Bumping again, please could somebody help, this has never happened to me before. |
|
|
| Report Abuse |
|
|
| |
|
|
| 02 Mar 2013 09:56 AM |
| Please help. this is really frustrating me, why does this only work in Studio? |
|
|
| Report Abuse |
|
|
1Topcop
|
  |
| Joined: 09 Jun 2009 |
| Total Posts: 6635 |
|
|
| 02 Mar 2013 10:10 AM |
wait() -- All. LocalScripts. NEED THIS HERE. Player = game.Players.LocalPlayer search = script.Parent.Parent.TextBox NotInDatabase = Player.PlayerGui.Database.NotInDatabase
function onClicked() if search.Text:lower()=="fear" then -- Learn about string.lower on the wiki, just search string manipulation Player.PlayerGui.Database.GroupGui.OriginalFEAR.Visible = true else NotInDatabase.Visible = true end end
script.Parent.MouseButton1Down:connect(onClicked)
|
|
|
| Report Abuse |
|
|
| |
|
1Topcop
|
  |
| Joined: 09 Jun 2009 |
| Total Posts: 6635 |
|
| |
|