Using ROBLOX's WIKI page for magnitude I manged to make it work for bricks, now trying to find the magnitude between frames is not working as well :
WIKI : (http://wiki.roblox.com/index.php?title=Magnitude)
WORKING CODE :
local center = game.Workspace.center
local short = game.Workspace.short
local long = game.Workspace.long
local magnitude = (center.Position - short.Position).magnitude
print(magnitude)
Now the working code is ONLY for the bricks, but I am trying to make this move over to a ScreenGUI + ImageButton.
Would I need to make my own Vector3 values in order to get the position, because using [(frame.Position - frame2.Position).magnitude] gives me an error
This leads me to that fact I need to get in individual values of the UDim2 properties, which I don't know how to do and that's why I came here.
ERROR : magnitude is not a valid member, did you forget to capitalize the first letter? 13:30:37.945 - Script 'Players.Player1.PlayerGui.ScreenGui.ImageButton.Script', Line 5

6 comments
Do you mind giving me a filled in example, I am not very good at math, my apologies.
Wil do - gimme a minute or so
No problem, take your time. Thank you.
Did this end up helping you?
Thanks!
It sure did!