In the picture, you can see the dummies playing the different animations; but for the player, the animation doesn’t play at all despite print saying it is playing.
Equipping the tool doesn’t play the rest animation despite print statements declaring that there is an AtRest animation and it is supposedly playing.
Local Script:
local Player = game.Players.LocalPlayer
local Weapon = script.Parent
Weapon.Equipped:Connect(function()
local Humanoid = Weapon.Parent.Humanoid
local AtRest = Humanoid:LoadAnimation(Weapon.AtRest)
if AtRest then
AtRest.Priority = Enum.AnimationPriority.Action
AtRest:Play()
print(AtRest, AtRest.IsPlaying)
end
end)
Weapon.Unequipped:Connect(function()
end)
Weapon.Activated:Connect(function()
end)
some type of animations don’t replicate over clients you need to either play it on the server or from the server fire a remote to signal all clients to play it
I’ve tried a script version. It still has the same issue;
local Weapon = script.Parent
Weapon.Equipped:Connect(function()
local Humanoid = Weapon.Parent.Humanoid
local Anim = Humanoid.Animator:LoadAnimation(Weapon.AtRest)
if Anim then
Anim.Priority = Enum.AnimationPriority.Action
Anim:Play()
end
end)
Weapon.Unequipped:Connect(function()
end)
Weapon.Activated:Connect(function()
local Humanoid = Weapon.Parent.Humanoid
local Anim = Humanoid.Animator:LoadAnimation(Weapon.Swing)
if Anim then
Anim.Priority = Enum.AnimationPriority.Action
Anim:Play()
end
end)
Same issue as before, the animation doesn’t play but is detected as playing
Weapon.Equipped:Connect(function()
local Humanoid = Weapon.Parent:WaitForChild("Humanoid")
local Anim = Humanoid:WaitForChild("Animator"):LoadAnimation(Weapon.AtRest)
if Anim then
Anim.Priority = Enum.AnimationPriority.Action
Anim:Play()
end
end)
Weapon.Unequipped:Connect(function()
end)
Copying what you wrote still led to the same problem on my side:
local Humanoid = Weapon.Parent:FindFirstChildOfClass("Humanoid")
local Animator = Humanoid:WaitForChild("Animator")
local Anim = Animator:LoadAnimation(script.Parent.AtRest)
Anim:Play()
Do you do anything in terms of adjusting the properties of the tool or the animations initially? I’m not sure if this is a possibility but I’ve used a weldconstraint to attach the handle to the tool; so perhaps this causes the animation to not play
I don’t use tools I weld the model to the player and play the animation, maybe that has something to do with it? I don’t change the animation priority because when you upload it you can change it that way, though
Like enable when loading it? I’m using a datastore and the player gets the tool they equipped for the previous session. I enabled the script like you’ve said, when the tool is being given to the player. Same issue still.
Yes I do. It’s a zombie spawner which it’s like 14-15+ zombies, but turning them off (not having them spawn) still doesn’t fix the issue. I don’t think it’s because of the zombies. Other than that, I don’t have any other animations playing.
yeah I realized afterward, I dunno, try go into a live game and see if it’s still broken, it may just be a studio bug? if not try a different animation? im pretty stumped here