v is a table with 6 numbers and v is a TextButton.
How would I use v.Name to call a table with the same name?
for i,v in pairs(weapons:GetChildren()) do
v.MouseButton1Click:connect(function()
stats.WDamage.Text = v.Name[1]
stats.WFireRate.Text = v.Name[2]
stats.WRange.Text = v.Name[3]
stats.WClips.Text = v.Name[4]
stats.WRPC.Text = v.Name[5]
stats.WUnlock.Text = v.Name[6]
end)
end |