我在我的塔防游戏中尝试使用 'WaitForChild' 错误索引 nil

I am getting the attempt to index nil with 'WaitForChild' error in my tower defense game

我正在制作一款塔防游戏,但我的健康脚本中出现 attempt to index nil with 'WaitForChild' 错误。塔在看着敌人,播放动画,只是不显示僵尸的更新生命值。有问题的假定代码是 local humanoid = model:WaitForChild("Humanoid") 有人知道如何让它显示更新的健康状况吗?

model 为零。确保设置正确。