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
You need to put the value you want to be changed for .Changed to work, in this case, it would be TextButton.Text.
TextButton.Text.Changed:Connect(function() if TextButton.Text == ("I like cheese and milk") then TextBox.Text = ("I like yur cut g") end end)