so im trying to play an animation, the if statements work, it prints “animation starting” right before it starts, but it doesn’t do anything?
local UserInputService = game:GetService("UserInputService")
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Mouse = Player:GetMouse()
local NewAnimation = Instance.new("Animation")
NewAnimation.AnimationId = "rbxassetid://15476177732"
NewAnimation.Parent = Character
UserInputService.InputBegan:Connect(function(Input)
if Input.UserInputType == Enum.UserInputType.MouseButton1 then
local Pickaxe = Character:FindFirstChild("Pickaxe")
print("Pickaxe: " .. tostring(Pickaxe))
if Pickaxe then
print("animation starting")
local Humanoid = Character:FindFirstChild("Humanoid")
local Animation = Humanoid:LoadAnimation(NewAnimation)
print(Animation)
Animation:Play()
end
end
end)
When making an animation using Animation editor, you can set a animation priority. If you didn’t set it to Action1/2/3/4, it won’t play over default animations.
Yeah, click “Import from roblox” from this menu, it will give you a list of your animations. Then you can edit it and save it again without making a new one.