So at the moment the script is set to play the animations at random but i don’t really want that. I want them to play from 1-5. How would i go about doing so?
local animationIndex = {
["1"] = .2,
["2"] = .2,
["3"] = .2,
["4"] = .2,
["5"] = .2
}
function OnActivation(player)
local chosenNum = tostring(math.random(1,5))
returnEvent:FireClient(player, chosenNum)
if check(player.Character) then
Tool.Handle.Trail.Enabled = true
--task.wait("x amoutn of time") this is so that the sound of the slash is linked up with the slash animation
if check(player.Character) then
task.wait(animationIndex[chosenNum])
Tool.Handle.Trail.Enabled = false
end
end
end
local db = false