So currently I have some code that plays an animation when mousebutton1 is down, but I want it to have alternate animations. I want it to be randomized, so that each time I press the mouse button it plays a different animation. Here's my code
local UserInputService = game:GetService("UserInputService")
local Tool = script.Parent
local Player = game.Players.LocalPlayer
local Character = Player.Character
local Humanoid = Character:WaitForChild("Humanoid")
UserInputService.InputBegan:Connect(function(InputObject)
if InputObject.UserInputType == Enum.UserInputType.MouseButton1 then
local Animation = Instance.new("Animation")
Animation.AnimationId = "rbxassetid://NoSeesLol"
local Track = Humanoid:LoadAnimation(Animation)
Track:Play()
end
end)
