I’m not sure if this is the right subcategory to post this in, but I made an animation to be played when a player activates a proximity prompt and my issue is simply that the animation is not playing. I am using prints to debug and it still prints after the animation should be played, even though the animation doesn’t play.
I have already changed the priority, and my game as well as the animation are both in R6. I tried replacing the animation I just made with a previous animation I made that worked in a different game of mine, of which I also tried the exact same code to make the animation play and it still didn’t work with a different animation or the same code.
I have looked for other posts on this same issue, and I have found and looked through many, but the solutions and tips in those posts did not work for me. I’m not sure if it’s an issue with my game, the avatar settings, (since they changed them to be a bit more complicated to me, but I’m pretty sure anyways it is set to R6), or my code trying to play the animation.
Here is my script:
local proxPrompt = script.Parent
local tapsStorage = game.ServerStorage.Taps
local anim = script.Animation
proxPrompt.Triggered:Connect(function(plr)
local tap = tapsStorage:FindFirstChild(plr.EquippedGears.Tap.Value):Clone()
if tap then
local animator = plr.Character.Humanoid.Animator
local track = animator:LoadAnimation(anim)
track:Play()
print("should've worked")
plr.Character.Humanoid.WalkSpeed = 0
plr.Character.Humanoid.JumpHeight = 0
proxPrompt.Enabled = false
local anchorPoint = script.Parent.Parent
tap.Parent = workspace
tap.PrimaryPart.CFrame = (anchorPoint.CFrame * CFrame.new(Vector3.new(-1.35,0,0)))
end
end)
If anyone can help it would be greatly appreciated!