Hey, how would I target a player without using their full name? Eg if I type "kill tack" it will do the same thing as typing "kill tacktic2010"
You could check if the name starts with what you want:
local function FindPlayer(name) name = name:lower() -- "AbcGG" becomes "abcgg" for k,v in pairs(game:GetService("Players"):GetPlayers()) do -- "MrSomebody" becomes "mrsom" if 'name' is 5 characters long if v.Name:lower():sub(1,#name) == name then return v -- found the player, return it end end end
Now you can do FindPlayer("tack") to find Tacktic2010.
local function FindPlayer(name) name = name:lower() for k,v in pairs(game:GetService("Players"):GetPlayers()) do if v.Name:lower():match("^"..name) then return v end end end
Just for those wondering this is another way of doing it, thanks Pyro! <3