im trying to match a certain player’s name with a lowercase version of their name in a textbox.
example:
local textBox = script.Parent
local textboxName = string.lower(textBox.Text) --The textbox has the name typed in it.
Now, how would I match a player from game.Players
with textboxName
?
1 Like
for i,v in pairs(game.Players:GetPlayers()) do
local name = string.lower(v.Name)
if name == textboxName then
-- Do what you want to do.
end
end
Make sure to put that code in a remote event and send the name to the server from the client.
1 Like
nvm, i figured it out. thanks for your patience and help, though!