Local script not loading at all?

print("here")
local Mob = script.Parent
local Hum = Mob:WaitForChild("Humanoid")
local CurrentHealth = Hum.Health
print(Hum:GetFullName())

local function HealthTweening(Health)
    print("healthchanged")

    if Health <= 0 then
        CurrentHealth = 0
    else
        CurrentHealth = Health
    end
    
    Mob:WaitForChild("HumanoidRootPart"):WaitForChild("Health"):WaitForChild("HealthUI"):WaitForChild("HealthStrip"):TweenSize(UDim2.new(CurrentHealth/Hum.MaxHealth, 0, 1, 0), "Out", Enum.EasingStyle.Linear, 0.1)
    --^^Put in client - Mobs have tag, look for tags and this
end

Hum.HealthChanged:Connect(HealthTweening)

For some reason, this script isn’t outputing anything. This script is in a model which is cloned in the beginning of the game with its parent as workspace.

Something I found from another post, are you doing this?

Script isn’t disabled, and this script is a local script to changing the value from the client will take effect.
However, what I’m saying is that even the “here” in the first line isn’t printing

Local scripts only run under a descendant of Player or Character. Placing it in workspace would not allow it to run. You can place the local script under the player or character.

3 Likes