I'm a beginner to coding and I'm trying to make a Health Bar script like the one below:
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:wait()
local Human = Character:WaitForChild("Humanoid")
local HealthFrame = script.Parent
Human.HealthChanged:Connect(function(Health)
HealthFrame.Size = UDim2.new(HealthFrame/Human.MaxHealth,0,1,0)
end)
But then I get an error like this:
Players.Klydefiss.PlayerGui.HealthStaminaUI.OuterFrame.HealthFrame.HealthBar.HealthScript:7: attempt to perform arithmetic on upvalue 'HealthFrame' (a userdata value)
I don't understand what arithmetic or upvalue means, So it would be nice if someone could explain to me what this error means.

3 comments
You're dividing the frame object (HealthFrame) with a number on line 7. Did you mean to type in just "Health"?
No, I had watched a scripting tutorial and I typed just as I saw it
Oh, I see what you mean, I'm trying to divide an Object by a number. I understand now.