|
| 12 Jul 2016 02:16 AM |
How can I make my weapon spawner not be case sensitive.
This is my code for checking the TextBox:
if Weapons:FindFirstChild(stringTextbox.Text)) ~= nil and torso ~= nil and debounce == false then debounce = true local Drop = Weapons:FindFirstChild(Textbox.Text).GunPickup:Clone()
Textbox.Text is where you insert the name of the weapon you want to spawn, but I want it so I am able to type in any condition (caps or no caps) and still spawn it. |
|
|
| Report Abuse |
|
|
|
| 12 Jul 2016 02:17 AM |
My bad, I was testing string.lower but it didn't work.
if Weapons:FindFirstChild(Textbox.Text) ~= nil and torso ~= nil and debounce == false then debounce = true local Drop = Weapons:FindFirstChild(Textbox.Text).GunPickup:Clone() |
|
|
| Report Abuse |
|
|
dev_Alekz
|
  |
| Joined: 14 Sep 2013 |
| Total Posts: 171 |
|
|
| 12 Jul 2016 02:21 AM |
| convert to string.lower() or string.upper() |
|
|
| Report Abuse |
|
|