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

Health is not a valid member of Model?

Asked by 3 years ago

Idk why this script will not work, but here's the code, and the enchantment brick script

Bowser code

     local function spellLanded(hit, spell)
          if hit.Parent:FindFirstChild("Humanoid") then
               local character = hit.Parent
               spell:Destroy()
        if character:FindFirstChild("enchanted") and character.enchanted.Value == true then
              bowser.Health = bowser.Health - (bowser.MaxHealth / 3) --when the error comes
                   character.enchanted.Value = false
                   else
                  character.Humanoid.Health = character.Humanoid.Health - 
       (character.Humanoid.MaxHealth / 3)
         end

  end

Enchantment code

       local function enchant(hit)
                if hit.Parent:FindFirstChild("Humanoid") then
                            local character = hit.Parent
                     character.enchanted.Value = true
                  end
                  end

                     script.Parent.Touched:Connect(enchant)
2
try changing it to bowser.Humanoid.Health JesseSong 3916 — 3y
0
it works thanks! :D Altbotnot 9 — 3y

Answer this question