Working on a system where you can look up players in a panel and kick them through the panel. In this part of the panel, I'm storing the user's name in a stringValue to keep for another script that shows the player's backpack. Somehow, the stringValue's value is not changing. Any help on this would be appreciated.
local textbox = script.Parent
local selected = textbox.Parent.Selected
local plrs = game:GetService("Players")
local usernameValue = script.Parent.Parent.Username
selected.Text = ""
textbox.Text = ""
textbox:GetPropertyChangedSignal("Text"):Connect(function()
if string.len(textbox.Text) > 20 then
textbox.Text = string.sub(textbox.Text,1,20)
end
selected.Text = ""
if string.len(textbox.Text) > 0 then
for _, v in pairs(plrs:GetPlayers()) do
if string.lower(textbox.Text) == string.sub(string.lower(v.Name),1,string.len(textbox.Text)) then
selected.Text = v.Name
usernameValue.Value = v.Name --right here is the part that is somehow not working/help?
print(v.Name) --just to debug/to lazy to take it out lol
end
end
end
end)

2 comments
Panel count from this question: 3
Called filtering enabled ;)