local char = script.Parent.Parent.Parent.Character
hum = char.Humaniod
hum.Changed:connect(function()
script.Parent.Frame.Health.Frame.Size = UDim2.new(hum.Health/hum.MaxHealth,0,1,0)
script.Parent.Text.TextLabel.Text = ""..hum.Health.."/"..hum.MaxHealth..""
if hum.Health <= hum.MaxHealth*0.30 then
script.Parent.Frame.Health.Frame.BackgroundColor3.new = Color3.new(255,0,0)
else
script.Parent.Frame.Health.Frame.BackgroundColor3.new = Color3.new(0,255,0)
end
end)
I get this error:
Humaniod is not a valid member of Model

1 comment
WaitForChild called on an Instance that is not in a DataModel.