Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Converting Stud into Yards <?>

Asked by 6 years ago

I am currently making a football game, which requires me to use studs instead of yards. How do I make a script that does that?

0
In roblox 20 studs are equivalent to 1 meter in real life. If you do conversions you'll see that ~1.094 yards are in 1 meter. So the real life equivalent of 1 yard in roblox would be ~21.9 studs. Keep in mind that this means the regular roblox character being 5 studs tall, would be about 10 inches tall, so you may have to do some proportional scaling. atawok 33 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

Using the reference of studs to centimetres, we can figure out how many yards.

1 stud = 20 centimetres (players are 1 metre high, 5 studs * 20 cm = 1 metre)

According to google, if you do centimetres / 91.44, that's how many yards are in the amount of centimetres you give.

local stud = 1
yard = (studs*20)/91.44
0
Would there be a way to detect exactly where you are, in terms of yards on a football field? Ftlicious 16 — 6y
0
Well, you'd have to signify what part to get the distance from, e.g. Cvieyra2test 176 — 6y
0
Thought it'd indent my post, whoops, anyways. You'd have to have one part at one end of the field to be the 'basis' of the length, then have the player get magnitude from the part, I can add it to the answer on how to that if you like. Cvieyra2test 176 — 6y
0
Please do. Ftlicious 16 — 6y
0
Sorry I didn't help you with magnitude, was very busy rip. Although I see you got help from someone. Hopefully it all goes well with ya script Cvieyra2test 176 — 6y
Ad

Answer this question