It’s already in a loop that is looping through the arguments. How would I go about adding something in here that could detect if two users had similar usernames to prevent accidental command execution on two users, if the admin only meant to do one?
for a,b in next,Players:GetPlayers() do
if string.sub(b.Name:lower(),1,#Segment) == lowerSegment then
table.insert(toReturn,b)
end
end
that’s how basic admin essentials does it bc it’s a modulescript returning to another modulescript, also it’s automatically in a loop for the arguments so what would be the best way to tell if two people had similar users the admin tried to execute on both just by using the first few characters