Hello, so I am trying to make a script that it sees if the parent's text is "90", if so, it will make the humanoid's health also 90. I'm just a girl trying to code for my friends over here.
here it is:
while true do wait(.15) print("Testing") if script.Parent.Text == "90" then script.Parent.Parent.Parent.Parent.Humanoid.Health = 90 end end
it doesn't show any errors or anything like that in the output. Please help! please ask any questions, Thanks!!
If you've put the script into a StarterCharacter model, this may not work.
Usually, when you insert a script into a StarterCharacter, when you start the game and check the Explorer, the script is deleted.
One thing you can do is put the script somewhere else, such as the Workspace, then use the Instance:Clone function to duplicate the script whenever someone joins the game, and then use .Parent to change the parent of each new script so that the script is in the new player's model.
Please tell me if it works or not!
Edit: Since you have a GUI, try using an if statement.