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)
There is no :service method for DataModel/game. You can do game.Players though or game:GetService("Players").