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

Converting Vector3 X and Z into UDim2 for Minimap?

Asked by
KoreanBBQ 301 Moderation Voter
8 years ago

I'm making a minimap and I'm trying to convert the X and Z of the Vector3 of every part into UDim2,

but I'm struggling to get the math to work. I want the minimap to show a 512x512 region of the map. Here's what I've got:

image.Position=UDim2.new((posX-0.5*(-512+sizeX))*rate,0,(posZ-0.5*(-512+sizeZ))*rate,0)
--rate being 1/512
--other variables self explanatory

Answer this question