I'm trying to make a health GUI but it won't work and this sign on the output says "Health is not a valid member of Frame"
Full Code:
local Frame = script.Parent
local plr = game:GetService("Players").LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local hum = char:WaitForChild("Humanoid")
hum.HealthChanged:Connect(function()
local percentage = hum.Health / hum.MaxHealth
Frame.Health:TweenSize(UDim2.fromScale(percentage,
Frame.Health.Size.Y.Scale))-- Error
Frame.HealthLabel.Text = math.floor(percentage * 100) .. "%"
end)

3 comments
If you explain something, Please use comments instead
If you explain something, Please use comments instead
If you explain something, Please use comments instead.