Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Health Keeps Setting to 0???

Asked by 8 years ago

I have a model with a Humanoid object. Every time I set the Health to 750 it changes back to 0. I set the MaxHealth to 750 first, I know what I'm doing. It works with my AI but just doesn't want to work with this model. Any ideas why ROBLOX is broken with this.

turret1.model.Humanoid.MaxHealth=stats.health
turret1.model.Humanoid.Health=stats.health
1
post all of the code could be helpful Kryddan 261 — 8y
0
That is all of the code. I just want to set the Humanoid health to 750, which is stats.health. It works in every humanoid but this one in turret1.model wravager 35 — 8y
0
turret1.model:MakeJoints() add that and see if it works Kryddan 261 — 8y
0
I already call that when I parent the model to workspace. I've also already tried it in this code. Just doesn't want to work. wravager 35 — 8y
View all comments (7 more)
0
Does the humanoid have a head,torso connected to it? And are you sure your surfacestypes on the parts can create joints? Kryddan 261 — 8y
0
That's no help without the children of the models xD User#11440 120 — 8y
0
Did you like...actually expect to get any help with two lines of code? ChemicalHex 979 — 8y
0
Did you like...actually expect to get any help with two lines of code? ChemicalHex 979 — 8y
0
Did you like...actually expect to get any help with two lines of code? ChemicalHex 979 — 8y
0
^ Did you like...actually have a productive response? wravager 35 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

OK, I somehow got around it. I had to remove the Torso brick and only have a brick named Head inside the model. If there is a torso I assume that the model has 'died' since the two are not connected like a player model is.

Ad

Answer this question