Bylocks
|
  |
| Joined: 27 Mar 2012 |
| Total Posts: 773 |
|
|
| 14 Jul 2017 08:16 PM |
if script.Parent.Visible == true then while wait() do
for _,item in pairs (script.Parent.Parent.Parent.Parent.Parent.Parent.Cards.GoldPlayers:GetChildren()) do
local str = item.Name local search = script.Parent.Text
if search ~= "" then if (string.lower(str:sub(1, #search)) == string.lower(search)) then blah blah
This is a search system and when i search ber1 for berezaa it still comes up or berezaaa it still comes up |
|
|
| Report Abuse |
|
|
Bylocks
|
  |
| Joined: 27 Mar 2012 |
| Total Posts: 773 |
|
| |
|
|
| 14 Jul 2017 08:57 PM |
Try
while true do
... ... ...
wait() end |
|
|
| Report Abuse |
|
|
Bylocks
|
  |
| Joined: 27 Mar 2012 |
| Total Posts: 773 |
|
| |
|
|
| 14 Jul 2017 09:00 PM |
First off, get rid of the while loop, I don't think it's doing anything for you.
add this right before your if statement to see what it's seeing.
print(search) print(str:sub(1,#search)
|
|
|
| Report Abuse |
|
|
Bylocks
|
  |
| Joined: 27 Mar 2012 |
| Total Posts: 773 |
|
|
| 14 Jul 2017 09:05 PM |
| the while wait() is so it continuesly updates |
|
|
| Report Abuse |
|
|
| |
|
caca50
|
  |
| Joined: 10 Jul 2011 |
| Total Posts: 2037 |
|
|
| 14 Jul 2017 09:39 PM |
local name = "caca50"
local example = 'caca'
if example:len()<=name:len() then if name:lower():sub(1,example:len())==example:lower() then print('good') else print('bad') end end
Roblox.Forum.Scripters:1: bad argument #1 to 'intellect' (number expected, got nil) |
|
|
| Report Abuse |
|
|
LaeMVP
|
  |
| Joined: 24 Jun 2013 |
| Total Posts: 4416 |
|
|
| 14 Jul 2017 09:43 PM |
local Names = {"yoda","waddup","ayo"} local LookingFor = "yo" for i,v in pairs(Names) do if v:match(LookingFor) then print(v) end end Are you looking for something like that? |
|
|
| Report Abuse |
|
|