generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Why isnt this working

Previous Thread :: Next Thread 
Bylocks is not online. 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 is not online. Bylocks
Joined: 27 Mar 2012
Total Posts: 773
14 Jul 2017 08:56 PM
^
Report Abuse
BoredLord101 is not online. BoredLord101
Joined: 28 May 2016
Total Posts: 180
14 Jul 2017 08:57 PM
Try

while true do

...
...
...

wait()
end
Report Abuse
Bylocks is not online. Bylocks
Joined: 27 Mar 2012
Total Posts: 773
14 Jul 2017 09:00 PM
nope
Report Abuse
ExtremeBuilder15 is online. ExtremeBuilder15
Joined: 01 May 2012
Total Posts: 3176
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 is not online. Bylocks
Joined: 27 Mar 2012
Total Posts: 773
14 Jul 2017 09:05 PM
the while wait() is so it continuesly updates
Report Abuse
BoredLord101 is not online. BoredLord101
Joined: 28 May 2016
Total Posts: 180
14 Jul 2017 09:27 PM
OH. I'm smart :P
Report Abuse
caca50 is not online. 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 is online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image