动画不播放。 (罗布乐思)
单击时,我正在用动画制作工具。但是,当我单击时,什么都没有发生。我尝试了2个脚本,没有出现错误,但是动画不播放。我拥有动画,其他人说它有效,我不知道为什么不适合我。这是我的第一个脚本:
script.Parent.Activated:Connect(function()
local action = script.Parent.Parent.Humanoid:LoadAnimation(script.Parent.ANIMATE)
action:Play()
end)
这是我的第二个脚本:
local tool = script.Parent
local animation = tool.ANIMATE
tool.Activated:Connect(function()
local character = tool.Parent
local humanoid = character.Humanoid
local AnimationTrack = humanoid:LoadAnimation(animation)
AnimationTrack:Play()
end)
任何帮助!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
事实证明,我有一个动画,与我忘记了在脚本中使用的其他游戏所需的动画完全相同。我不知道较新的人发生了什么,但我终于可以继续前进!
It turns out I had an animation that was exactly the same as the one I needed for a different game that I forgot about that works in my script. I have no idea what happened with the newer ones but I can finally move on!
您应该在Roblox开发人员文档中进行搜索,并且您会发现
humanoid:loadAnimation()
功能已被弃用。因此您需要使用
humanoid
。 /class/animator“ rel =” nofollow noreferrer“>animator
:loadAnimation()
。You should of searched in the Roblox Developer Documentation and you would of found that the
Humanoid:LoadAnimation()
function has been deprecated.So you will need to use
Humanoid
.Animator
:LoadAnimation()
.