so i made an animation a while ago but it only played correctly when i tilted it backwards 90 degrees, i dont know how to fix this
how it should play:
how it actually plays:
also heres the script:
local CollectionService = game:GetService("CollectionService")
local UserInputService = game:GetService("UserInputService")
local Player = game.Players.LocalPlayer
local vCharacter = Player.Character or Player.CharacterAdded:Wait()
local Mouse = Player:GetMouse()
local RockFoundEvent = game.ReplicatedStorage.RockFoundEvent
local NewAnimation = Instance.new("Animation")
NewAnimation.AnimationId = "rbxassetid://15963721047"
NewAnimation.Parent = vCharacter
local Active = false
local HitDistance = 13.5 -- the distance that you can hit the rock from
function StopAnimations(humanoid)
for i, v in pairs(humanoid:GetPlayingAnimationTracks()) do
v:Stop()
end
end
local function DoRaycast()
-- removed because not related
end
UserInputService.InputBegan:Connect(function(Input)
if Input.UserInputType == Enum.UserInputType.MouseButton1 then
local Pickaxe = vCharacter:FindFirstChild("Pickaxe")
if Active == true then return end
if Pickaxe == nil then return end
if Pickaxe:IsA("Tool") and Pickaxe.Equipped then
Active = true
local vHumanoid = vCharacter:FindFirstChild("Humanoid")
local Animation = vHumanoid:LoadAnimation(NewAnimation)
Animation:Play(0.25,10,0.9)
DoRaycast()
task.wait()
Active = false
end
end
end)
What is the animation priority for this? Animation priority makes a huge difference in playing animations. If this didn’t help, then you probably took the wrong animation
Weight is basically a measure of say priority. It can be used for interpolation between 2 animations. You can try that by setting weight to a value between 0-1. 1 being no interpolation and 0 being that animation won’t play.
You can stop all the animation tracks then play the animation
function StopAnimations(humanoid)
for i, v in pairs(humanoid:GetPlayingAnimationTracks()) do
v:Stop()
end
end
-- after you call the function, play the animation
Also why is your task.wait() empty? Try adding a number. Another reason (unlikely) why this error is happening is probably that you are playing multiple animations at once
And you didn’t use yoshi’s function (referring to your script) soo…
task.wait() adds a very small delay, also yoshi’s script stops other animations but i tried it already and it didn’t work, i also removed it from the script afterwards, i just kept the function
Yeah but it’s practically useless since you’re making an extremely extremely fast cooldown it doesn’t really guarantee it won’t play the same animation twice. I recommend only enabling Active after the animation has finished.