Hello!
I want to create a type corresponding to the class, and the code does work, but I’d like to know if there’s a better way to do this without just repeating everything thats already mentioned in the constructor? This is what I’ve done:
export type RoomType = { model: Model, doorPositions: { Vector3 } }
function RoomClass.new(model: Model, doorPositions: { Vector3 }): RoomType
local newRoom = setmetatable({}, Room)
newRoom.Model = model
newRoom.DoorPositions = doorPositions
return newRoom
end
Thanks!