--Makes the food etable --Variables script:WaitForChild("TilCashOut") local plr = game.Players.LocalPlayer local Char = plr.Character local Brick = script.Parent CanContinue = true TilCashOut = plr.plrvalues.BricksPerCash.Value TilCash = script.TilCashOut --WaitForChilds plr:WaitForChild("leaderstats") plr:WaitForChild("plrvalues") script.Parent:WaitForChild("EatReach") script.Parent:WaitForChild("EatLoop") local function onActivate() if CanContinue == true then --Animation loader, variables local AnimEat = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Parent.EatReach) local Animloop = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Parent.EatLoop) AnimEat:Play() if TilCash.Value == plr.plrvalues.BricksPerCash.Value then plr.leaderstats.Cash.Value = plr.leaderstats.Cash.Value + plr.plrvalues.PerCashOut.Value * plr.plrvalues.CashMultip.Value TilCash.Value = 0 end TilCash.Value = TilCash.Value + 1 script.Parent.Eating:Play() CanContinue = false Animloop:Play() wait(2) Animloop:Stop() script.Parent.Eating:Stop() plr.leaderstats.Bricks.Value = plr.leaderstats.Bricks.Value + plr.plrvalues.PerBrick.Value * plr.plrvalues.Multiple.Value CanContinue = true else --Do nothing end end Brick.Activated:Connect(onActivate)
I've done everything possible, I can't figure out why the animation doesn't play. Any idea?
Thanks!
Have you tried checking the priority and making sure it's action so it can play whilst other animations are playing? And are you sure it's an R15 rig animation?
Hmm, I feel like your animation isn't fit with R15 avartar type (maybe). I tested your script, it work pretty well.
Solution
Just check again your animation.
Hope i helped you!