Hello I have an animation that is suppose to play on a part touch, but for some reason it doesn’t play. It’s arms stick out a bit, but nothing else. Here is the script.
local debounce = false
local Animation = Instance.new("Animation")
Animation.AnimationId = "rbxassetid://7506392985"
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
if debounce == false then
local Animator = Instance.new("Animator")
Animator.Parent = hit.Parent.Humanoid
local animationTrack = Animator:LoadAnimation(Animation)
animationTrack:Play()
debounce = true
wait(2)
debounce = false
end
end
end)
I’m going to assume you’re doing this animation on a players character
The players character already has a Animator in the humanoid so you don’t have to worry about making one
Otherwise your script looks fine, Have you tried checking what the AnimationPriority is?
Odd
Have you tried removing the part where you make a animator and just get the animator inside the players humanoid?
If that doesn’t work maybe try parenting the animation somewhere? I don’t think that will do anything but its worth a shot.