hello! Im trying to make a script that links up a textbox's text and the health of a humanoid. the model with the humanoid has a part in it that has the textbox. im trying to make it so that if the textbox says "90" the humanoid's health will be set to 90. ive tried just about everything that I know of. It shows no errors or anything in the output (but the "Testing" shows up in the output). so yeah, please help. thank you in advance! ^^
heres the code i used, its pretty simple. I just dont know why it isnt working :
while true do
wait(.15)
print("Testing")
if script.Parent.Text == "90" then
script.Parent.Parent.Parent.Parent.Humanoid.Health = 90
end
end
so yeah..

2 comments
its a group in workspace, it has a humanoid that is supposed to have the same health as the player. and show that on the textbox. so when the player's health = 90, then the textbox says "90" and then the humanoid's health goes to 90. (this sounds so stupid saying this outloud haha)
Oh.