RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"when a player says "kill me" then the player dies."
-- local script (StarterPlayerScripts) local player = game.Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local function onPlayerChatted(message) if message == "kill me" then if character and character:FindFirstChild("Humanoid") then character.Humanoid.Health = 0 end end end player.Chatted:Connect(onPlayerChatted)