Hey, I am trying to change the player’s walk, run and idle animation upon colliding with an object. However, after setting the new animations; the player is just completely still without animation while moving.
local humanoid = script.Parent
humanoid.Touched:Connect(function(hit, limb)
if hit.Transparency == 1 then
return
end
if hit.Name == "CaptureTheFlag" then
script.Parent.Animate.walk.walk.AnimationId = "rbxassetid://892267099"
script.Parent.Animate.run:run.AnimationId = "rbxassetid://892265784"
for _, child in pairs(script.Parent.Animate.idle:GetChildren()) do
child.AnimationId = "rbxassetid://892268340"
end
end
end)