Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

If I loop through the table {hi = 1}, will v = hi or 1?

I was wondering this, as I need to know this when making my script.

1 comment

0

In a for loop, "v" is only a convention. They are regular variables and can be called whatever they want.

1 answer

Given you are using in pairs, the value is 1.

To reach that value, you have to index the table like table.hi

This discussion is preserved as it was. New answers, comments, and votes are closed.