hdtv13
|
  |
| Joined: 18 Sep 2012 |
| Total Posts: 1628 |
|
|
| 31 Dec 2014 11:28 AM |
How would i make this script detect if the text box has a certain number in it e.g 109 and if it has it removes the gui
script.Parent.Submit.MouseButton1Click:connect(function() if script.Parent.ID.Text == 109 then script.Parent.Parent:remove() end end)
Thanks! HDTV13 - Chief of BTP Posting failed = 97x64 (Error user logged out) |
|
|
| Report Abuse |
|
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
|
| 31 Dec 2014 11:34 AM |
You're trying to compare a string with a number.
if script.Parent.ID.Text == "109" then |
|
|
| Report Abuse |
|
|
hdtv13
|
  |
| Joined: 18 Sep 2012 |
| Total Posts: 1628 |
|
|
| 31 Dec 2014 11:40 AM |
Oh thanks
Thanks! HDTV13 - Chief of BTP Posting failed = 97x64 (Error user logged out) |
|
|
| Report Abuse |
|
|
Scriptos
|
  |
| Joined: 17 Jun 2008 |
| Total Posts: 2900 |
|
|
| 31 Dec 2014 12:07 PM |
You can do;
script.Parent.ID.Text == 109
if tonumber(script.Parent.Id.Text) == 109 then
tonumber() converts a string to an integer. |
|
|
| Report Abuse |
|
|