Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Health Keeps Setting to 0???

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

11 comments

1

post all of the code could be helpful

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

0

turret1.model:MakeJoints() add that and see if it works

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.

0

Does the humanoid have a head,torso connected to it? And are you sure your surfacestypes on the parts can create joints?

0

That's no help without the children of the models xD

0

Did you like...actually expect to get any help with two lines of code?

0

Did you like...actually expect to get any help with two lines of code?

0

Did you like...actually expect to get any help with two lines of code?

0

^ Did you like...actually have a productive response?

1 answer

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.