Lets say there are multiple objects in a workspace with the same name: item & item
They are both located under game.Workspace.Terrain.item
I want to be able to grab the position of them and set that to a variable as follows in terms of the Vector3 location
local test = game.Workspace.Terrain.item.Position
I've been able to do this with objects that are in the game as long as there is only one of them with a name that isn't being shared by another object. What I want to do currently works if there is only one item.
How do I grab and save the position of multiple items with the same name and workspace location?
My ultimate goal is to be able to split up the two items with their different vectors so I can save the coordinates as local x = item.x etc. Is there a way to maybe split the returned vectors into an array and do something like local x = item[1].x?

5 comments
I have a GUI and I am attempting to teleport my character to the location of a part on the map that shares the same name of other parts. This code does work for a single part but still not for multiple. I tested it with local test = v.Position and then attempting to teleport to the location but there is an error thrown when trying to get the x,y,z of the variable test.
well you didn't say u used gui .-.
I just posted the code I tried on the thread here. Again said code does work as written if there is only a single object under terrain by that name.
I had the ends in there I just forgot to copy them lol
Try this i edit again