**Hello! I am currently having trouble with my script.
This is what it looks like:
local function Name(name)
for _, player in pairs(game:GetService("Players"):GetPlayers()) do
if player.Name:lower() == name:lower() then
return player
end
end
end
script.Parent.MouseButton1Click:connect(
function()
local player = Name(script.Parent.Parent.UsernameHandler.Text)
if player then
game.Workspace.Value.Value = player
script.Parent.Parent.Username.Text = game.Workspace.Value.Value
end
end
)
When I try to submit the username, the output says 13:08:25.136 - Players.raid6n.PlayerGui.TableFinder.Background.TextButton.LocalScript:18: bad argument #3 to 'Value' (string expected, got Object)"
Thank you for reading, have a great day.****

2 comments
Can you put your text inside of a code block please? It is really hard to read what you have here.
my example has the code in a code block only changed value = player to value = player.Name