Making an animation for a button, and I come across this error. Here's the code:
01 | local player = game.Players.LocalPlayer.Character |
02 | local animation = game.ReplicatedStorage.Kamehame |
03 | local track = player.Humanoid:LoadAnimation(animation) |
04 |
05 | function onClick(mouse) |
06 | track:Play { } |
07 |
08 |
09 |
10 | end |
11 |
12 | script.Parent.MouseButton 1 Down:connect(onClick) |
This is a LocalScript. Any answers?