I am making a create your own admin commands script for a group and I need to know if any errors are noticed in this script. I am asking this because every time I run it the script returns an error at "nil".
--[[ create ur commands list here! :) example. kill; --]] local msg = Instance.new("Hint") msg.Name = "Message" msg.Parent = Workspace msg.Text = "Loading GOODCommands Script made by GoodkidMad" wait(10) msg:remove() end function PfP(t) local Sel = {} for i, a in pairs(game.Players:GetChildren()) do if string.lower(string.sub(a.Name,1,string.len(t))) == string.lower(t) then Sel[#Sel + 1] = a end end return Sel end player = game.Players["GoodkidMad"] function commands(t) if string.lower(t) == "kill;me" then game.Workspace[player.Name].Humanoid.Health = 0 elseif string.sub(string.lower(t),1,5) == "kill;" then for i, a in pairs(PfP(string.sub(string.lower(t),6))) do a.Character.Humanoid.Health = 0 end end end player.Chatted:connect(commands)
Also if you have any good admin command you would like me to add give me the small script below and or request it as a comment. Thanks for your help!