-- Place: ServerScriptService.LuauTour (Script) --!strict type Checkpoint = {name: string, height: number} local checkpoints: {Checkpoint} = { {name = "Start", height = 1}, {name = "Bridge", height = 3}, {name = "Finish", height = 5}, } local function totalHeight(items: {Checkpoint}): number local total = 0 for _, checkpoint in items do total += checkpoint.height end return total end for index, checkpoint in checkpoints do print(index, checkpoint.name, checkpoint.height) end print("Total", totalHeight(checkpoints)) local origin = Vector3.new(0, 1, 0) local destination = Vector3.new(12, 2, 0) print("Distance", (destination - origin).Magnitude) assert(totalHeight(checkpoints) == 9, "Unexpected total")