Hi, I'm trying to make my first animation for a game I'm working on. I'm having an issue with this animation where everything works fine, it prints 'done' but the animation will not play. I've uploaded to roblox and done everything the wiki says.
Here's the code -
local tool = script.Parent
local player = game.Players.LocalPlayer
local swing = Instance.new("Animation")
swing.AnimationId = "http://www.roblox.com/Asset?ID=273714865"
local animtrack = nil
local canplay = true
script.Parent.Equipped:connect(function(mouse)
mouse.Button1Down:connect(function(hitting)
if canplay == true then
canplay = false
local playit = player.Character.Humanoid:LoadAnimation(swing)
playit:Play()
canplay = true
print 'done'
end
end)
end)
