First, we should check if the person is in the server when we press the Enter button.
If so, we autocomplete.
local Text = TEXTBOX_HERE;
local newText;
Text.Changed:Connect(function(t)
if (newText) then newText:Destroy() end;
newText = Instance.new('TextLabel', script.Parent.Parent);
newText.Name = 'NewText'
newText.Font = Text.Font;
newText.Text = '';
newText.Size = Text.Size;
newText.Position = Text.Position;
newText.Visible = Text.Visible;
newText.TextXAlignment = Text.TextXAlignment;
newText.BackgroundTransparency = 1;
newText.TextYAlignment = Text.TextYAlignment;
newText.ZIndex = -50;
newText.TextScaled = Text.TextScaled;
newText.TextSize = Text.TextSize;
local C = Text.TextColor3;
newText.TextColor3 = Color3.fromRGB(C.r-50, C.g - 50, C.b - 50);
for i, v in pairs(game:GetService('Players'):GetPlayers()) do
if (v.Name:lower():match(Text.Text:lower()) and Text.Text ~= '' ) then
newText.Text = v.Name;
newText.Parent = Text.Parent;
end
end
end);
This will work if you type in bob, hiim, hi, ob, and etc. This works great if you remember a part of someone's name, but not the entire thing. Capitalization does not matter.
5 comments
picture is blocked
oh lemem update it
https://imgur.com/a/0FsUjsf
add me on discord ill send it there LEWIS1063#0743
added u there, user is world killer