Introduction
Hi I'm Matt, and I'm making my own custom admin panel. I'm having trouble with my account age finder script that finds a possible matching username of a player then sets a textbox text to the players username, then sets a textlabel to the players account age (Days old). There are no errors in the client or server, I don't know what I did wrong.
Code
Here is my code:
function findUser()
local players = game.Players:GetPlayers()
local buttontext = script.Parent.Text
local answertext = script.Parent.Parent.EnteredPlayerAccountAge.Text
local matches = {}
for i, Player in ipairs(players) do
local name = Player.Name
local term = string.sub(name, 1, string.len(buttontext))
local match = string.find(term, buttontext)
if match then
table.insert(matches, name)
name.AccountAge = answertext
end
end
if not #matches > 1 then
buttontext = matches[1]
end
end
Conclusion
In conclusion, I would like help with this, as I have looked over many dev forum posts, and the developer wiki and found nothing that could help. Any help is appreciated, this is my first time using strings!
Edits:
I might have found the problem, I forgot to connect the function. Still doesn't work, so if you find anything else please answer.

5 comments
what would you put for the text if you were an admin
Could you explain more? I'm confused.
like is it caps sensitive?
it should be the exact username the player has yes
I had a similar problem myself, I found a solution after a few days, it needs some explaining so if you still need help I'd rather you connect me in discord, [CLASSIFIED]#9999