I want to make a player’s moveset swap between movesets in a table by finding their current moveset, checking where that moveset is in a table of movesets, adding/subtracting 1 from that number, finding the moveset in the new position and giving them that moveset. The issue is that i have no idea how to do this, I have tried table.find but i don’t think that’s what i need
--Movesets that the class has
VergilModule.Movesets = {
["1"] = "Yamato",
["2"] = "Beowulf",
["3"] = "Daggers"
}
--
SwapRemote.OnServerEvent:Connect(function(player: Player, Direction: string)
local Character = player.Character or player.CharacterAdded:Wait()
local Humanoid = Character:FindFirstChildOfClass("Humanoid")
local ClassModule = LoadClassModule:FindModule(player:GetAttribute("Class"))
if Direction == "Up" then
elseif Direction == "Down" then
end
end)