Is their any problem with the "nil" in this script?
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".
11 | local msg = Instance.new( "Hint" ) |
15 | msg.Text = "Loading GOODCommands Script made by GoodkidMad" |
22 | for i, a in pairs (game.Players:GetChildren()) do |
23 | if string.lower(string.sub(a.Name, 1 ,string.len(t))) = = string.lower(t) then |
30 | player = game.Players [ "GoodkidMad" ] |
33 | if string.lower(t) = = "kill;me" then |
34 | game.Workspace [ player.Name ] .Humanoid.Health = 0 |
35 | elseif string.sub(string.lower(t), 1 , 5 ) = = "kill;" then |
36 | for i, a in pairs (PfP(string.sub(string.lower(t), 6 ))) do |
37 | a.Character.Humanoid.Health = 0 |
42 | 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!