AttackList = {"http://www.roblox.com/Asset?ID=277328828", "http://www.roblox.com/Asset?ID=277925886", "http://www.roblox.com/Asset?ID=277938710"} local AnimId = AttackList[(math.random(1, 3))] local Player = game.Players.LocalPlayer local Mouse = Player:GetMouse() Mouse.Button1Down:connect(function(key) local TestAttack = Instance.new("Animation") TestAttack.AnimationId = AnimId local animTrack = Player.Character.Humanoid:LoadAnimation(TestAttack) animTrack:Play() end)
This script works fine apart from the fact that it only chooses 1 ID and you have to reset to get another one. So how do I make it choose a random ID from the table each time I click?