Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How will I automatically guess players name when entering the start of it?

I am attempting to make a moderation GUI that allows my in-game admins to teleport players, kick them etc. However, right now they need to enter in the players full name (ROBLOX instead of ROB or something) I have tried to use :findfirstchild, however that returns nil unless the players name is completely entered.

1 answer

✓ Accepted answer
local SearchFor = "Lua"
for i,v in pairs(game.Players:GetPlayers()) do
if v.Name:lower():sub(1,SearchFor:len()) == SearchFor:lower() then
print(v.Name)
end
end

1 comment

0

Thank you

This discussion is preserved as it was. New answers, comments, and votes are closed.