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

What do the two values mean? Is it a measurement of studs?

local xPosition = math.random(-64,64)

What exactly is the measurement that these values use?

(-64,64) Does that mean studs? What is the measurement?

1 answer

It's simply a number.

You never gave context on what xPosition is used for, but I'm assuming it is for the X component of a part's position.

math.random(-64, 64) will give a single number between -64 and 64, so you are setting the variable to be that random number.

If you do choose to set that number as the X component for the position, then yes, the part's X component will be that many studs along the x-axis, 0 being the origin.

Hope this helps! :)

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