How to find something in a dictionary with a table

I am passing a table for my hit module, but when I try to find something in the table to change a hitsound, it isn’t working.

	local hitsounds = {
		SlashSound = script.SlashHit:Clone(),
		BluntSound = script.BluntHit:Clone(),
		GS = script.GSHit:Clone(),
		StaffHitSound = script.BoStaffHit:Clone()
	}
	local hitsound = script.HitSound:Clone()
	if damagetable.HitSound then
		for i,v in pairs (damagetable) do
			if hitsounds[v] then
				hitsound = hitsounds[v]
			end
		end
	end
	hitsound.Parent = hitchar.HumanoidRootPart

The table has

StaffHitSound = true

in it, which is being passed, but nothing is still happening.

Im unsure of what you want but this is what you want to do I guess :

if hitsounds[i] then
	hitsound = hitsounds[i]
end