1 | TextButton.Changed:Connect( function () |
2 | if TextButton.Text = = ( "I like cheese and milk" ) then |
3 | 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?
1 | local humanoidcheck = game:FindFirstChild( "Humanoid" ) |
2 | if humanoidcheck ~ = nil then |
3 | 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.
1 | TextButton.Text.Changed:Connect( function () |
2 | if TextButton.Text = = ( "I like cheese and milk" ) then |
3 | TextBox.Text = ( "I like yur cut g" ) |
4 | end |
5 | end ) |