Hi so I just cant get this script to get working I been experimenting around with it and still its not working I would just like to know how to it the correct way If you are confused with the problem im asking go ahead and comment to explain it more clearly Im not a great explainer so sorry but here is the script~~~~~~~~~~~~~~~~~ if script.Parent.Text:FindFirstChild("Humanoid") then game.Players.LocalPlayer.Character.Humanoid.Health = 0 ~~~~~~~~~~~~~~~~~ dont mind the capital mistakes thanks I hope you guys could help me on this - activatesenju
if script.Parent.Text == game.Players.LocalPlayer.Name then game.Players.LocalPlayer.Character.Humanoid.Health = 0 end
Explaination:
You used _:FindFirstChild(<name>), which searches if the object that you are referencing contains something with the name *<name>*. So this means that you were checking if the script.Parent contained a object named "Humanoid". This doesn't check the text of the textbox. To check the text you use if _.Text = <text> then. In this case you would need to check if the script.Parent.Text = game.Players.LocalPlayer.Name.
Please read the articles below to find out more about the difference.
http://wiki.roblox.com/index.php?title=API:Class/Instance/FindFirstChild
http://wiki.roblox.com/index.php?title=API:Class/TextBox/Text