TextButton.Changed:Connect(function()
if TextButton.Text == ("I like cheese and milk") then
TextBox.Text = ("I like yur cut g")
Within these lines I want to kill the player within the if statement and after the then. I tried this; but it did not work? The player did not die. Any thoughts?
local humanoidcheck = game:FindFirstChild("Humanoid")
if humanoidcheck ~= nil then
humanoidcheck.Health = 0

2 comments
I did include the end statements, so that is not the problem! Just an FYI!
I assume that this is in a localscript, so when you kill the player it only kills the player on the player's device, and not the server.