i was making an admin script, that when the localplayer types something in chat, they die, why wont this script work:
local p = game.Players:findFirstChild("UzL_z")
p.Chatted:connect(function(message)
local msg = string.lower(message)
if string.find(msg, "kill") then
game.Players.LocalPlayer.Character.Head:Remove()
end
end
(Roblox studio thinks the script is fine, it just dosent work)
(i am new to Lua scripting)

1 comment
What kind of script are you using this in?