Hey everyone!
I wanted to make multiple animations for sword swinging… So it isn’t just the exact same anim over and over again…
I have 5 different slice animations, and I’d like to play them all randomly when someone clicks…
Here is the sword that I use
Here is the animate script:
local tool = script.Parent
local anim = script.Parent.Swing
local plr = game:GetService("Players").LocalPlayer
local char = plr.Character
local animTrack = char:WaitForChild("Humanoid"):LoadAnimation(anim)
tool.Activated:Connect(function()
animTrack:Play()
end)
´´´
If you know how to do this please help me out!
Try using a for loop for every animation you have.
When it does an animation, it loops to the next one so the next time you swing it will be another animation.
if you want it to be random, use math.random() or Random.new() and index the animation from a table for randomness
however, in case you don’t want the animation to be repeated, you can have a separated table and remove the used animation to prevent it from being repeated