How come I'm unable to change a Players health?
Asked by
3 years ago Edited 3 years ago
I currently have a vest system and it should be setting the health when a player has a vest but for some reason, it just won't work at all it works perfectly fine without doing that but while doing it it won't work at all what is going on?
01 | game.Players.PlayerAdded:Connect( function (Player) |
02 | Player.CharacterAppearanceLoaded:Connect( function (Character) |
03 | local Humanoid = Character:WaitForChild( "Humanoid" ) |
06 | local MaxHealth = Humanoid.MaxHealth |
07 | local Health = Humanoid.Health |
12 | [ "TanVest" ] = Character:FindFirstChild( "TanVest" ); |
13 | [ "BlackVest" ] = Character:FindFirstChild( "BlackVest" ); |
17 | local charChildren = Character:GetChildren() |
19 | local tanVest = table.find(charChildren, Vests.TanVest) |
20 | local blackVest = table.find(charChildren, Vests.BlackVest) |
25 | print ( "Player has a TanVest" ) |
27 | print ( "Player has a BlackVest" ) |
31 | print ( "Player has no vest" ) |