drahsid5
|
  |
| Joined: 13 May 2011 |
| Total Posts: 3937 |
|
|
| 09 Sep 2013 07:20 PM |
I seriously can't tell.
script.Parent.Mouse.MouseButton1Down:connect(function() wait() if (script.Parent.Parent.TextArea.Text == {"test", "test2", "test3"}) then script.Parent.Parent:Remove() wait(1) else script.Parent.Parent.TextLabel.Text = "Wrong ALPHA Key! Note: if it says 'R1u' then you type 'R1u' not 'r1u' or 'R1U'." script.Parent.Parent.TextLabel.FontSize = "Size24" wait(3) script.Parent.Parent.TextLabel.FontSize = "Size48" script.Parent.Parent.TextLabel.Text = "Insert your ALPHA Key." wait(0.4) end end)
When life gives you lemons, Squirt 'em in your eyes. - Drahsid5 |
|
|
| Report Abuse |
|
|
1waffle1
|
  |
| Joined: 16 Oct 2007 |
| Total Posts: 16381 |
|
|
| 09 Sep 2013 07:21 PM |
| A string cannot be equal to a table. |
|
|
| Report Abuse |
|
|
Soquick
|
  |
| Joined: 01 Nov 2012 |
| Total Posts: 1497 |
|
|
| 09 Sep 2013 07:23 PM |
| "test" or "test2" or "test3" |
|
|
| Report Abuse |
|
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 09 Sep 2013 07:23 PM |
| Also wouldnt it be better to use a TextBox instead? |
|
|
| Report Abuse |
|
|
1waffle1
|
  |
| Joined: 16 Oct 2007 |
| Total Posts: 16381 |
|
|
| 09 Sep 2013 07:24 PM |
| That will always evaluate to true. |
|
|
| Report Abuse |
|
|
drahsid5
|
  |
| Joined: 13 May 2011 |
| Total Posts: 3937 |
|
|
| 09 Sep 2013 07:33 PM |
wut? .-.
When life gives you lemons, Squirt 'em in your eyes. - Drahsid5 |
|
|
| Report Abuse |
|
|
1waffle1
|
  |
| Joined: 16 Oct 2007 |
| Total Posts: 16381 |
|
|
| 09 Sep 2013 07:38 PM |
`if (script.Parent.Parent.TextArea.Text == {"test", "test2", "test3"}) then` will never be true because a string cannot be equal to a table. They are different data types. `if (script.Parent.Parent.TextArea.Text == "test" or "test2" or "test3") then` will always evaluate to true because the conditional statement will return either true if TextArea.Text=="test" or it will return 'test2' if it isn't.
`if script.Parent.Parent.TextArea.Text:match('^test[23]?$')then` would be what you're looking for here. |
|
|
| Report Abuse |
|
|
drahsid5
|
  |
| Joined: 13 May 2011 |
| Total Posts: 3937 |
|
|
| 09 Sep 2013 07:50 PM |
Makes sense =D Just can you explain the "[23] and "?$"
When life gives you lemons, Squirt 'em in your eyes. - Drahsid5 |
|
|
| Report Abuse |
|
|
drahsid5
|
  |
| Joined: 13 May 2011 |
| Total Posts: 3937 |
|
|
| 09 Sep 2013 07:57 PM |
and "^"
When life gives you lemons, Squirt 'em in your eyes. - Drahsid5 |
|
|
| Report Abuse |
|
|
1waffle1
|
  |
| Joined: 16 Oct 2007 |
| Total Posts: 16381 |
|
|
| 09 Sep 2013 08:05 PM |
| http://wiki.roblox.com/index.php/String_pattern |
|
|
| Report Abuse |
|
|
drahsid5
|
  |
| Joined: 13 May 2011 |
| Total Posts: 3937 |
|
|
| 09 Sep 2013 08:14 PM |
thanks, I'll check that out.
When life gives you lemons, Squirt 'em in your eyes. - Drahsid5 |
|
|
| Report Abuse |
|
|
drahsid5
|
  |
| Joined: 13 May 2011 |
| Total Posts: 3937 |
|
|
| 09 Sep 2013 08:24 PM |
your line didn;y work, would this?
pattern = "^[23]?$" if script.Parent.Parent.TextArea.Text:match('test'):match(pattern) then
When life gives you lemons, Squirt 'em in your eyes. - Drahsid5 |
|
|
| Report Abuse |
|
|
1waffle1
|
  |
| Joined: 16 Oct 2007 |
| Total Posts: 16381 |
|
| |
|
drahsid5
|
  |
| Joined: 13 May 2011 |
| Total Posts: 3937 |
|
|
| 10 Sep 2013 03:50 PM |
Hmm .-. maybe its the other scripts in the GUI...
When life gives you lemons, Squirt 'em in your eyes. - Drahsid5 |
|
|
| Report Abuse |
|
|
drahsid5
|
  |
| Joined: 13 May 2011 |
| Total Posts: 3937 |
|
|
| 14 Sep 2013 02:50 PM |
nope, only tweening scripts =P
When life gives you lemons, Squirt 'em in your eyes. - Drahsid5 |
|
|
| Report Abuse |
|
|
drahsid5
|
  |
| Joined: 13 May 2011 |
| Total Posts: 3937 |
|
|
| 14 Sep 2013 02:57 PM |
The output says "Mouse is not a valid member of TextButton"
When life gives you lemons, Squirt 'em in your eyes. - Drahsid5 |
|
|
| Report Abuse |
|
|
Soquick
|
  |
| Joined: 01 Nov 2012 |
| Total Posts: 1497 |
|
| |
|
ZachBloxx
|
  |
| Joined: 26 Jun 2013 |
| Total Posts: 2833 |
|
|
| 14 Sep 2013 03:09 PM |
| script.Parent.MouseButton1Down:connect(function() |
|
|
| Report Abuse |
|
|
drahsid5
|
  |
| Joined: 13 May 2011 |
| Total Posts: 3937 |
|
|
| 14 Sep 2013 03:30 PM |
@soquick, I did, look at the OP. @Zach Thanks =D
When life gives you lemons, Squirt 'em in your eyes. - Drahsid5 |
|
|
| Report Abuse |
|
|
Soquick
|
  |
| Joined: 01 Nov 2012 |
| Total Posts: 1497 |
|
|
| 14 Sep 2013 03:38 PM |
| script.Parent.MouseButton1Click:connect(function() will be better. |
|
|
| Report Abuse |
|
|
ZachBloxx
|
  |
| Joined: 26 Jun 2013 |
| Total Posts: 2833 |
|
|
| 14 Sep 2013 03:47 PM |
No. They are the exact same events, only the MouseButton1Down gets the x and y position of where the mouse button was pressed. |
|
|
| Report Abuse |
|
|
drahsid5
|
  |
| Joined: 13 May 2011 |
| Total Posts: 3937 |
|
|
| 14 Sep 2013 03:48 PM |
lol
When life gives you lemons, Squirt 'em in your eyes. - Drahsid5 |
|
|
| Report Abuse |
|
|
drahsid5
|
  |
| Joined: 13 May 2011 |
| Total Posts: 3937 |
|
|
| 14 Sep 2013 03:48 PM |
what if I wan right click? *cough* mousebutton2 *cough*
When life gives you lemons, Squirt 'em in your eyes. - Drahsid5 |
|
|
| Report Abuse |
|
|
Soquick
|
  |
| Joined: 01 Nov 2012 |
| Total Posts: 1497 |
|
|
| 14 Sep 2013 03:57 PM |
Down fires when they put their mouse down. Click fires when it is fully clicked, down and up. Down glitches sometimes from people dragging their mouse off, then releasing. |
|
|
| Report Abuse |
|
|
ZachBloxx
|
  |
| Joined: 26 Jun 2013 |
| Total Posts: 2833 |
|
|
| 14 Sep 2013 04:01 PM |
I've never experienced any glitches with it.
Nonetheless, I was just correcting the OP's event. |
|
|
| Report Abuse |
|
|