I have a script that handles all the chat commands when they are said the first two work but the last one, the kill cmd, doesn't seem to work. Here is the script:
local admins = {"Ki_ngPhantom"}
local banned = {}
local prefix = "*"
game.Players.PlayerAdded:connect(function(plr)
plr.Chatted:connect(function(msg)
if msg:lower() == prefix.."version" then
print("0.01")
end
if msg:lower() == prefix.."suicide" then
plr.Character.Humanoid.Health = 0
end
if msg:lower():sub(1, 6) == prefix.."kill " then
game.Players:FindFirstChild(msg:lower():sub(6)).Character.Humanoid.Health = 0
end
end)
end)
It comes up with an error message that says:
17:41:13.224 - Workspace.Ki_ngPhantoms Admin Commands.Main_Script:13: attempt to index a nil value 17:41:13.225 - Stack Begin 17:41:13.225 - Script 'Workspace.Ki_ngPhantoms Admin Commands.Main_Script', Line 13 17:41:13.226 - Stack End

2 comments
Thanks, that works! And in the script it didn't set "Humanoid" to 0. I don't know why it showed up like that.
Oh, alright. Have fun!