I've been trying to play a test anim in order to acquaint myself with the system, following this tutorial: http://wiki.roblox.com/index.php/Animations.
I have the plugin and made the test animation, but it doesn't play. I don't know if it's a problem with the animation code, or the code for having it happen when a brick is touched.
I'd also like to know, how do I set up an if/when to play the animation?
The script in question:
local brick = workspace.Part
brick.Touched:connect(onTouch)
local animation = Instance.new("Animation")
animation.Animation.ID = "http://www.roblox.com/item.aspx?id=315360368"
local animTrack = workspace.Player.Humanoid:LoadAnimation(animation)
function onTouch(part)
animTrack:Play()
end

1 comment
output