Hello,
I would like to find a way to get this method which is supposed to output a table with the raw string values of each airport name to work. Currently not even the method is being triggered/fired.
I would greatly appreciate any help.
My module script:
local airport = {}
airport.destinations = {
Zakynthos = {
Name = "Zakynthos";
IATA = "ZAK"
}
}
airport.airlines = {
Airline = {
Name = "Airline";
GroupID = 1;
IATA = "AA";
Destinations = {
airport.destinations.Zakynthos;
}
}
}
for i, v in ipairs(airport.airlines) do
function v:GetDestinations()
print("method fired")
local dest = {}
for _, x in ipairs(v.Destinations) do
table.insert(dest, x.Name)
end
return dest
end
end
return airport
Script
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local dest = airportData.airlines.Airline:GetDestinations()
for i, v in ipairs(dest) do
print(v)
end
Thank you!

1 comment
To get a module you must require. so just put local dest = require(airportData.airlines.Airline:GetDestinations). If I knew the answer to your other question, I would put this in an answer. (but i don't)