I am trying to conduct my own Admin Commands script, but the script isn't working, the Output says that 'find' is a nil value, but I dont understand, here is the script;
wait(0)
print("Admin Loaded")
admins={"TheeDeathCaster"}
game:service("Players").PlayerAdded:connect(function(plr)
for i=1,#admins do
if plr.Name:lower()==admins[i]:lower()then
plr.Chatted:connect(function(msg)
if msg:lower():sub(1,5)=="kill/"then
find=game:service("Players"):FindFirstChild(msg:sub(5))
if find~=nil then
find.Character:BreakJoints() --It said the error was here, attempting to call find (a nil value)
print("Killed "..find)
else
print(find.." does not exist")
end end
end)
else
print("nil Player")
end end end)

2 comments
try "if find then"
I did before I added nil, it said the same thing (attempt to call 'find' a nil value)