so basically i have a Model with motor6ds inside a HumanoidRootPart and a Part, i animating the model using moon and have a script where if the player touches it, the anim will play.
HOWEVER, the animation does not play and the model remains still
this is how the model is setup (everything unanchored in Model):
and the script i am using:
local hitdb = false
local attackAnim = script.Parent.Parent.Humanoid.Animator:LoadAnimation(script.Parent.Parent.Parent.RGAttack)
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local struggleAnim = hit.Parent.Humanoid.Animator:LoadAnimation(script.Parent.Parent.Parent.Struggle)
if hit.Parent.IsEnemy.Value == false and not hitdb then
hitdb = true
hit.Parent.HumanoidRootPart.CFrame = script.Parent.Parent.Parent.Player.CFrame
hit.Parent.Stunned.Value = true
hit.Parent.HumanoidRootPart.Anchored = true
attackAnim:Play()
struggleAnim:Play()
print('hit Player')
task.wait(10)
hitdb = false
end
end
end)
the animation for the player works, but the model animation doesnt