Basically I want to create a function that returns a players full name with correct capitilization from any form of captilization and shortened names.
Ex.
- Player named gmatchOnRoblox
- I'd give a function GmAtch
- It'd return gmatchOnRoblox
Current code that I have:
local fetchUsername = function()
for _,v in next, Players:GetPlayers() do
local decode = string.match((v.Name):lower(), RawUsername .. "%w+")
return Players[decode].Name
end
end
RawUsername is just a string given to the function from a variable, i.e a players name. What I wanted it to do was return the players name correctly in perfect capitilization. Could anyone help me out here?

2 comments
I am confused what this is supposed to do.... You want a name that has correct capitalization... But, all the players' names have correct capitalizations. What are you trying to do, it doesn't make sense.
Okay lets say the player types your name like this "KiNglone". I want the function to return "KingLoneCat". Does that clear things up?