Hi, I’m working on a command and it all works but it is Capital Sensitive. Meaning that if it misses a Capital, it doesn’t work. I realized that HD Admin doesn’t have that issue so there must be a fix to that.
Currently I have a function that gets the players full name if they type half of their name.
local function getFullName(message)
local userAffected = string.sub(message, string.find(message," ",1,false) + 1, string.len(message))
local userFinal = string.sub(userAffected, 1, string.find(userAffected, " ",1,false)-1)
if players:FindFirstChild(userFinal) ~= nil then
return userFinal
else
for v,i in pairs(players:GetChildren()) do
if string.sub(i.Name, 1, string.len(userFinal)) == userFinal then
return i.Name
end
end
end
return false
end
Please help.