我尝试用“WaitForChild”来索引 nil我的塔防游戏出错
我正在制作一款塔防游戏,刚刚在我的健康脚本中出现 attempt to index nil with 'WaitForChild'
错误。塔正在看着敌人,播放动画,它只是不显示僵尸的更新健康状况。有问题的假设代码是 local humanoid = model:WaitForChild("Humanoid")
有人知道如何让它显示更新的健康状况吗?
I am making a tower defense game and just got attempt to index nil with 'WaitForChild'
error in my health script. The tower is looking at the enemy, playing the animations, it just does not show the updated health of the zombies. The supposed code in question is local humanoid = model:WaitForChild("Humanoid")
Does anybody know how to make it show updated health?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
model
为零。确保设置正确。model
is nil. Make sure you set it properly.